Make library compatible with Particle devices

This commit is contained in:
CAOU123
2016-10-20 15:46:44 -04:00
parent 1defe6d8e1
commit 7810d0d0b3
8 changed files with 72 additions and 7 deletions

View File

@ -443,7 +443,7 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
handshake += "\r\n";
client->tcp->write(handshake.c_str(), handshake.length());
client->tcp->write((uint8_t*)handshake.c_str(), handshake.length());
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266_ASYNC)
client->tcp->readStringUntil('\n', &(client->cHttpLine), std::bind(&WebSocketsClient::handleHeader, this, client, &(client->cHttpLine)));