cc3000 hostdriver with the mbed socket interface
Dependents: cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more
Diff: Socket/TCPSocketConnection.cpp
- Revision:
- 28:8c7cc1c76ff8
- Parent:
- 13:5e36c267e62f
--- a/Socket/TCPSocketConnection.cpp Fri Oct 04 07:06:29 2013 +0000
+++ b/Socket/TCPSocketConnection.cpp Sat Oct 05 20:29:39 2013 +0200
@@ -112,7 +112,11 @@
}
int n = _cc3000_module->_socket.recv(_sock_fd, data, length, 0);
- _is_connected = (n != 0);
+ if (n >= 0) {
+ _is_connected = 1;
+ } else {
+ _is_connected = 0;
+ }
return n;
}
SimpleLink Wi-Fi CC3000
Avnet Wi-Go System