Jump to content
  • Advertisement
Sign in to follow this  
Dead6re

Type of socket

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

For network programming in winsock, for a multipayer game, which is the best to use? I have heard a lot about using non-blocking and Asynchronous, which should be used? If you wondering about the genre of the game, can you say specfically per genre (MMO, RTS & FPS are the ones I am looking at).

Share this post


Link to post
Share on other sites
Advertisement
From what I see (haven't actually tested each one under many different scenarios) this does not really depend on the kind of game. With games with lower numbers of connections, simple blocking socket I/O will suffice. Though if you want a larger number of active connections, you're going to want to use a more efficient management system, such as asynchronous sockets. If using .NET, this is a very easy task. When it comes to MMO-size server, many will strongly suggest looking at IOCP if the backbone server is using Windows and has multiple processors / a processor have multiple cores.

Asynchronous sockets are better than non-blocking performance-wise due to the fact that you do not have to constantly poll them. Instead, you will be "told" when an event happens, and its up to you to decide when to take care of it.

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!