I have client code that receives a response from the server using UDP and recvfrom() . This works fine when the server is turned on, but as soon as I stop the server, my client program hangs; I suspect recvfrom () is awaiting a response from the server.
If the server and client are both installed on the same system, I get an error message from recvfrom() when the server is turned off, but when the server and client are on different systems, the client hangs in recvfrom (), because it has not responded to the server since it off.
Please, can someone give me an idea of ββhow I can deal with this situation, maybe intercepting a timer signal can solve the problem. Can anyone shed some light on this?
I am using Visual studio 2005.
source share