add deprecated warning for loop in async mode

fix sync mode
This commit is contained in:
Markus Sattler committed 2016-01-23 18:41:45 +01:00
1 parent 5c2c257526
commit 790a922d5a
3 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -340,7 +340,7 @@ void WebSocketsClient::handleClientData(void) {
switch(_client.status) {
case WSC_HEADER:
{
String headerLine = _client->tcp->readStringUntil('\n');
String headerLine = _client.tcp->readStringUntil('\n');
handleHeader(&_client, &headerLine);
}
break;
+2 -2
View File
@@ -98,15 +98,15 @@ void WebSocketsServer::begin(void) {
DEBUG_WEBSOCKETS("[WS-Server] Server Started.\n");
}
#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
/**
* called in arduino loop
*/
void WebSocketsServer::loop(void) {
#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
handleNewClients();
handleClientData();
#endif
}
#endif
/**
* set callback function
+7
View File
@@ -42,7 +42,14 @@ public:
~WebSocketsServer(void);
void begin(void);
#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
void loop(void);
#else
// Async interface not need a loop call
void loop(void) __attribute__ ((deprecated)) {
}
#endif
void onEvent(WebSocketServerEvent cbEvent);