Skip to content

Commit

Permalink
feat(socketio): add disconnect function
Browse files Browse the repository at this point in the history
  • Loading branch information
mavyfaby authored and Links2004 committed May 23, 2023
1 parent a215cca commit 751cf87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/SocketIOclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/SocketIOclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 751cf87

Please sign in to comment.