Jump to content
  • Advertisement
Sign in to follow this  
hawkk

Winsock [Client/Server] lag

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

Hello, I am faced with a small problem, which I could not solve myself. Therefore, I go to you with a request to help out. The fact is that clients connecting to servers, it starts to slow down and at the end it crashes. Where could be the problem?
Server: Link
Client: Link

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You appear to be mutating data inside a thread without any synchronisation. I'm very suspicious of some of the other things you are doing too, but that alone would be enough to explain any crash.

I'd suggest you get a simple headless server working first. Use select() rather than putting the networking in a background thread.

Actually follow your error checking through. There is no point in doing rudimentary error checking in recive [sic], when the calling functions ignore the return value.

There is much more to be said, but I don't have time at the moment.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!