feat(socketio): add disconnect function

This commit is contained in:
mavyfaby
2023-05-22 19:54:29 +08:00
committed by Markus
parent a215cca4fe
commit 751cf87b6c
2 changed files with 6 additions and 1 deletions

View File

@ -93,6 +93,10 @@ void SocketIOclient::setReconnectInterval(unsigned long time) {
return WebSocketsClient::setReconnectInterval(time);
}
void SocketIOclient::disconnect(void) {
WebSocketsClient::disconnect();
}
/**
* send text data to client
* @param num uint8_t client id

View File

@ -61,8 +61,9 @@ class SocketIOclient : protected WebSocketsClient {
#endif
#endif
bool isConnected(void);
void onEvent(SocketIOclientEvent cbEvent);
void disconnect(void);
bool sendEVENT(uint8_t * payload, size_t length = 0, bool headerToPayload = false);
bool sendEVENT(const uint8_t * payload, size_t length = 0);