Sign in to follow this  

Type of socket

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

This topic is 3629 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this