elhayra / tcp_server_client

A thin and simple C++ TCP client server
MIT License
155 stars 53 forks source link

Server `acceptClient` timeout parameter not used #6

Closed doleron closed 3 years ago

doleron commented 3 years ago

It seems the int timeout parameter in:

Client TcpServer::acceptClient(uint timeout)

has no effect because it is not used to setup the timevalstruct.

It turns out the actual timeout is always 2 secs:

struct timeval tv;
tv.tv_sec = 2;
tv.tv_usec = 0;
elhayra commented 3 years ago

Thank you for contributing code to fix this

doleron commented 2 years ago

Thank you for contributing code to fix this

You're welcome!