quest
2005-09-27 06:39:49 UTC
I could use select() function to impose time out value on connect()
function. I did a simple test. Consider the following scenario:
1. Impose 20 seconds time out value on connect() function (using select()).
2. Run client connect application that attempts to connect a specific
server.
3. After 5 seconds, i started the listening server.
The problem here is the client will not be able to connect to server. It
will just time out even though the server is now running. Any idea why this
is happening ? I though connect() function is supposed to try to connect to
server within the imposed time out value. Thanks.
function. I did a simple test. Consider the following scenario:
1. Impose 20 seconds time out value on connect() function (using select()).
2. Run client connect application that attempts to connect a specific
server.
3. After 5 seconds, i started the listening server.
The problem here is the client will not be able to connect to server. It
will just time out even though the server is now running. Any idea why this
is happening ? I though connect() function is supposed to try to connect to
server within the imposed time out value. Thanks.