add setReconnectInterval for the Client

This commit is contained in:
Links
2017-08-19 21:16:07 +02:00
parent 29df9c30f7
commit 522a67bc1b
4 changed files with 79 additions and 45 deletions

View File

@@ -83,6 +83,8 @@ class WebSocketsClient: private WebSockets {
void setExtraHeaders(const char * extraHeaders = NULL);
void setReconnectInterval(unsigned long time);
protected:
String _host;
uint16_t _port;
@@ -94,6 +96,9 @@ class WebSocketsClient: private WebSockets {
WebSocketClientEvent _cbEvent;
unsigned long _lastConnectionFail;
unsigned long _reconnectInterval;
void messageReceived(WSclient_t * client, WSopcode_t opcode, uint8_t * payload, size_t length, bool fin);
void clientDisconnect(WSclient_t * client);