8000 feat(socketio): add `disconnect` function · smartcoder00/arduinoWebSockets@751cf87 · GitHub
[go: up one dir, main page]

Skip to content

Commit 751cf87

Browse files
mavyfabyLinks2004
authored andcommitted
feat(socketio): add disconnect function
1 parent a215cca commit 751cf87

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/SocketIOclient.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ void SocketIOclient::setReconnectInterval(unsigned long time) {
9393
return WebSocketsClient::setReconnectInterval(time);
9494
}
9595

96+
void SocketIOclient::disconnect(void) {
97+
WebSocketsClient::disconnect();
98+
}
99+
96100
/**
97101
* send text data to client
98102
* @param num uint8_t client id

src/SocketIOclient.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ class SocketIOclient : protected WebSocketsClient {
6161
#endif
6262
#endif
6363
bool isConnected(void);
64-
64+
6565
void onEvent(SocketIOclientEvent cbEvent);
66+
void disconnect(void);
6667

6768
bool sendEVENT(uint8_t * payload, size_t length = 0, bool headerToPayload = false);
6869
bool sendEVENT(const uint8_t * payload, size_t length = 0);

0 commit comments

Comments
 (0)
0