Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of WebSocketClient by
Diff: Websocket.cpp
- Revision:
- 2:b390f29fb5fa
- Parent:
- 1:de85cd4ec77b
- Child:
- 3:9589afa4712e
--- a/Websocket.cpp Mon Aug 13 09:21:41 2012 +0000 +++ b/Websocket.cpp Mon Aug 13 09:37:35 2012 +0000 @@ -83,8 +83,6 @@ printf("Could not send request"); return false; } - - while(socket.receive(cmd, 1) != 1); ret = read(cmd, 200); if(ret < 0) @@ -185,9 +183,13 @@ return false; } + socket.set_blocking(false, 1); if (socket.receive(&opcode, 1) != 1) { + socket.set_blocking(false, 2000); return false; } + + socket.set_blocking(false, 2000); if (opcode == 0x81) break;