wip
Dependents: EthernetInterface_vz
Fork of Socket by
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);