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
Revision 2:b390f29fb5fa, committed 2012-08-13
- Comitter:
- samux
- Date:
- Mon Aug 13 09:37:35 2012 +0000
- Parent:
- 1:de85cd4ec77b
- Child:
- 3:9589afa4712e
- Commit message:
- less timeout to read the first character received
Changed in this revision
| Websocket.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
