|
@@ -62,11 +62,11 @@ __declspec( dllexport ) bool WebSocketClient::connect()
|
|
|
{
|
|
|
Text message = "GET ";
|
|
|
message += path;
|
|
|
- message += " HTTP/1.1\n";
|
|
|
+ message += " HTTP/1.1\r\n";
|
|
|
message += "Host: ";
|
|
|
message += host;
|
|
|
- message += "\nUpgrade: websocket\n";
|
|
|
- message += "Connection: Upgrade\n";
|
|
|
+ message += "\r\nUpgrade: websocket\r\n";
|
|
|
+ message += "Connection: Upgrade\r\n";
|
|
|
char *key = new char[ 25 ];
|
|
|
key[ 24 ] = 0;
|
|
|
key[ 23 ] = '=';
|
|
@@ -76,7 +76,7 @@ __declspec( dllexport ) bool WebSocketClient::connect()
|
|
|
message += "Sec-WebSocket-Key: ";
|
|
|
message += key;
|
|
|
delete[] key;
|
|
|
- message += "\nSec-WebSocket-Version: 13\n\n";
|
|
|
+ message += "\r\nSec-WebSocket-Version: 13\r\n\r\n";
|
|
|
klient = new Klient();
|
|
|
if( !klient->verbinde( port, host ) )
|
|
|
{
|
|
@@ -357,6 +357,7 @@ __declspec( dllexport ) void WebSocketClient::thread()
|
|
|
{
|
|
|
if( nextClose )
|
|
|
{
|
|
|
+ c.unlock();
|
|
|
c2.lock();
|
|
|
klient->trenne();
|
|
|
klient = klient->release();
|