WinSock Cross-Platform Alternative?

Started by
3 comments, last by Evil Steve 16 years, 5 months ago
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!
Advertisement
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
Forum FAQ has a list of portable socket libraries.
Thanks to both of you!

I'm gonna try Enet first as it seems to be what I was looking for, if not I'll take a look at the forum FAQ.

Thanks again.
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.

This topic is closed to new replies.

Advertisement