Check websocket connection
This commit is contained in:
@ -52,7 +52,7 @@ constexpr uint32_t wifiReconnectInterval = 10000;
|
||||
/* Local server */
|
||||
|
||||
// The port for the local server to directly receive messages over WiFi
|
||||
constexpr uint16_t localWebServerPort = 80;
|
||||
constexpr uint16_t localPort = 80;
|
||||
|
||||
/* Server */
|
||||
|
||||
|
@ -55,6 +55,8 @@ public:
|
||||
|
||||
void connect();
|
||||
|
||||
void disconnect();
|
||||
|
||||
void loop();
|
||||
|
||||
/**
|
||||
@ -66,16 +68,13 @@ public:
|
||||
void sendResponse(uint8_t* buffer, uint16_t length);
|
||||
|
||||
bool isSocketConnected() {
|
||||
return socketIsConnected;
|
||||
return webSocket.isConnected();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
ServerConfiguration configuration;
|
||||
|
||||
// Indicator that the socket is connected.
|
||||
bool socketIsConnected = false;
|
||||
|
||||
ServerConnectionCallbacks* controller = NULL;
|
||||
|
||||
// WebSocket to connect to the control server
|
||||
|
Reference in New Issue
Block a user