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.
Dependents: cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more
Diff: Socket/UDPSocket.cpp
- Revision:
- 16:f3676ae62f96
- Parent:
- 13:5e36c267e62f
- Parent:
- 12:1c2a856c618a
- Child:
- 28:8c7cc1c76ff8
--- a/Socket/UDPSocket.cpp Wed Oct 02 15:29:26 2013 +0000
+++ b/Socket/UDPSocket.cpp Wed Oct 02 16:00:41 2013 +0000
@@ -57,15 +57,13 @@
return -1;
}
-// if (!_blocking) {
-// TimeInterval timeout(_timeout);
-// if (wait_writable(timeout) != 0) {
-//#if (CC3000_DEBUG == 1)
-// printf("DEBUG: The socket is not writeable. _sock_fd: %d.\n", _sock_fd);
-//#endif
-// return 0;
-// }
-// }
+ if (!_blocking) {
+ TimeInterval timeout(_timeout);
+ if (wait_writable(timeout) != 0) {
+ DBG_SOCKET("The socket is not writeable. _sock_fd: %d", _sock_fd);
+ return 0;
+ }
+ }
return _cc3000_module->_socket.sendto(_sock_fd, packet, length, 0, (sockaddr *)&remote._remote_host, sizeof(sockaddr));
}
SimpleLink Wi-Fi CC3000
Avnet Wi-Go System