Jump to content
  • Advertisement
Sign in to follow this  
md_lasalle

TCP timout

This topic is 4383 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!