TCP timout
Hi! My server is listening for tcp connection on some socket i poll with select(). After some time, if my server is running without any connections made, it is not accepting connection anymore...so i guess it's just a socket timeout my router is not mapping anymore...just a guess Is there a socket option i could put in, or maybe some sort of timeout in my program closing the socket and recreating one that I listen() on ? Thanks for any advices
That's rather odd. I'm reasonably certain most TCP implementations won't timeout on a listen socket. It wouldn't make sense. Is this using winsock in Windows? I could imagine reaching the maximum number of allowed connections, or perhaps being interrupted by a signal of some sort, but having a listen socket time out sounds wrong to me.
Ok this wasnt the problem, sorry
But do you think it is possible my router close the listening socket if for lets say no connections occurs for like 2 weeks...extreme case
But do you think it is possible my router close the listening socket if for lets say no connections occurs for like 2 weeks...extreme case
Your router wouldn't even know the litsen socket existed. There's no notification there. Your router will either forward all incoming TCP requests to the right port, or it won't. If you set a map from the right external port to the right local network IP and port, it should work fine or not, but it shouldn't stop after a couple weeks unless your router reset and lost its settings or something.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement