Question

Currently have a winsock application that connects to a server. It can send and receive packets, but after a few minutes(around 2, if you wanted me to guess) of not sending anything, it disconnects and I have restart it, which is pretty annoying. Thanks in advance.

No correct solution

OTHER TIPS

You can try setting KEEPALIVE to true. You set this using the socket options. You have to set it on both the client socket and the server's listening socket.

Have a look at: http://linux.die.net/man/2/setsockopt And http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top