Sign in to follow this  

WinSock Cross-Platform Alternative?

This topic is 3676 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, I'm currently learning OpenGL, and making a basic Pong game. I was planning on making it multi-player using WinSock, however I am wondering if there is a Cross-Platform alternative to WinSock that I could use instead? Any help is greatly appreciated!

Share this post


Link to post
Share on other sites
ENet is a free open-source cross-platform UDP networking library with a socket interface, its quite easy and simple to use too, so you might want to take a look at its socket interface. AFAIK, it shouldnt have much of a difference from winsock.

Good luck with your projects!

EDIT: To make it clear, its socket interface works for both TCP and UDP

Share this post


Link to post
Share on other sites
You can use the plain BSD sockets, which is pretty much the normal Winsock functions that aren't prefixed with WSA* (E.g. select(), send(), recv(), socket(), etc). You'll still need to call WSAStartup and WSACleanup in Windows builds, but that shouldn't be too bad.

Share this post


Link to post
Share on other sites

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