mbed socket API
Dependents: EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more
Deprecated
This is an mbed 2 sockets library. For mbed 5, network sockets have been revised to better support additional network stacks and thread safety here.
Diff: TCPSocketServer.cpp
- Revision:
- 6:cd2e5559786d
- Parent:
- 5:300e7ad2dc1d
- Child:
- 10:d24738f4ef99
--- a/TCPSocketServer.cpp Thu Jul 26 15:07:32 2012 +0000
+++ b/TCPSocketServer.cpp Fri Jul 27 13:58:53 2012 +0000
@@ -57,12 +57,12 @@
return 0;
}
-int TCPSocketServer::accept(TCPSocketConnection& connection, int timeout) {
+int TCPSocketServer::accept(TCPSocketConnection& connection, int timeout_ms) {
if (_sock_fd < 0)
return -1;
- set_timeout(timeout);
- if (wait_readable() != 0)
+ TimeInterval timeout(timeout_ms);
+ if (wait_readable(timeout) != 0)
return -1;
socklen_t newSockRemoteHostLen = sizeof(connection._remoteHost);
mbed official


