member887
11-14-2008, 08:15 PM
Hi -
Not sure where this post would fall under so I'm posting it under general programming.
I am working on a client application that establishes connection to a server and then waits for server data. But if there is no data to read in 30 seconds, I would like the application to timeout. How do I simply interrupt the connection and return without terminating the process on Windows? On Unix, I can use the alarm()/signal() call. For Windows, I found the SetTimer() to time the hang, but how do I send a signal to interrupt the connection? Any suggestions or comments greatly appreciated.
Thanks,
member887
Not sure where this post would fall under so I'm posting it under general programming.
I am working on a client application that establishes connection to a server and then waits for server data. But if there is no data to read in 30 seconds, I would like the application to timeout. How do I simply interrupt the connection and return without terminating the process on Windows? On Unix, I can use the alarm()/signal() call. For Windows, I found the SetTimer() to time the hang, but how do I send a signal to interrupt the connection? Any suggestions or comments greatly appreciated.
Thanks,
member887