bump version

optimize String usage (less malloc / realloc)
remove double debug line
This commit is contained in:
Markus Sattler
2015-10-21 17:17:09 +02:00
parent d2d06b59a4
commit 187a4ac823
2 changed files with 14 additions and 17 deletions

View File

@ -1,5 +1,5 @@
name=WebSockets
version=1.0
version=1.1
author=Markus Sattler
maintainer=Markus Sattler
sentence=WebSockets for Arduino (Server + Client)

View File

@ -272,28 +272,25 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
unsigned long start = micros();
String handshake;
handshake="GET "+client->cUrl+" HTTP/1.1\r\n";
handshake+="Host: "+_host+"\r\n";
handshake+="Upgrade: websocket\r\n";
handshake+="Connection: Upgrade\r\n";
handshake+="User-Agent: arduino-WebSocket-Client\r\n";
handshake+="Sec-WebSocket-Version: 13\r\n";
handshake+="Sec-WebSocket-Protocol: arduino\r\n";
handshake+="Sec-WebSocket-Key: "+client->cKey+"\r\n";
String handshake = "GET " + client->cUrl + " HTTP/1.1\r\n"
"Host: " + _host + "\r\n"
"Upgrade: websocket\r\n"
"Connection: Upgrade\r\n"
"User-Agent: arduino-WebSocket-Client\r\n"
"Sec-WebSocket-Version: 13\r\n"
"Sec-WebSocket-Protocol: arduino\r\n"
"Sec-WebSocket-Key: " + client->cKey + "\r\n";
if(client->cExtensions.length() > 0) {
handshake += "Sec-WebSocket-Extensions: " + client->cExtensions + "\r\n";
}
handshake += "\r\n";
client->tcp.write(handshake.c_str(), handshake.length());
DEBUG_WEBSOCKETS("[WS-Client][sendHeader] sending header... Done (%uus).\n", (micros() - start));
DEBUG_WEBSOCKETS("[WS-Client][sendHeader] sending header... Done (%uus).\n", (micros() - start));
}
/**