Jump to content
  • Advertisement
Sign in to follow this  
Ozymandias42

winsock - recvfrom and WSAECONNRESET

This topic is 4354 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

I've been writing a networked client and server in Windows XP, and I've been testing locally. I run the server, then I launch the client, which connects to the server. So far, so good. However, if the client is suddenly disconnected, on the server's next recvfrom() call, I get back SOCKET_ERROR, which turns out to be WSAECONNRESET. Also, every subsequent call to recvfrom() is also WSAECONNRESET. If I start a new client up, sometimes its data gets through, but when there's no data in the pipeline, it's still that same WSAECONNRESET error. Am I supposed to do something with this error to indicate I've received it in order for it to go away, and is it normal to get so many of this error?

Share this post


Link to post
Share on other sites
Advertisement
Actually, I just got an idea for why this is happening (had to happen while I was at work). When the recvfrom() fails, that doesn't stop me from sending regular update packets to the locally-connected client. Does anyone know if the host and port values are set correctly on this error? I could search through my list of clients looking for one with that address and port and stop sending packets there.

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!