badri.coder
badri.coder

Reputation: 157

Linux : receive from socket with timeout?

I have an graphics application , where data comes from server whenever there is an update in the screen. (Incremental update). I am observing that when there is no data coming from server , after some time socket is getting closed. is there any way to handle this scenario?

Upvotes: 0

Views: 85

Answers (1)

X Zhang
X Zhang

Reputation: 307

Maybe the "TCP keepalive" is what you need. You can get more information in this web page: http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/programming.html

Upvotes: 2

Related Questions