Crossplatform socket library

Started by
3 comments, last by Antheus 16 years, 3 months ago
Can anyone recommend a good, lightweight cross platform sockets library that provides a common iterface to winsock and Berkeley sockets, and isn't GPL? I've found boost ASIO (Async IO, not the music interface) that looks promising, but it's still in development and hasn't been included into boost yet. I'm building a simple web server as a educational exercise, so libraries like Enet are out since they are UDP only.
Advertisement
Take a look at RakNet and SDL_net.
POCO is a good choice and auto protocol builder is a good choice too.
Best,Kevin Johttp://www.upredsun.com**Easily and automatically build tcp-based or udp-based network protocol source code**
Quote:Original post by MrMark
Can anyone recommend a good, lightweight cross platform sockets library that provides a common interface to winsock and Berkeley sockets, and isn't GPL?


It only takes a handful of #defines to turn Winsock into Berkeley sockets, if all you're doing is using very simple client/server apps.
Quote:Original post by MrMark
Can anyone recommend a good, lightweight cross platform sockets library that provides a common iterface to winsock and Berkeley sockets, and isn't GPL? I've found boost ASIO (Async IO, not the music interface) that looks promising, but it's still in development and hasn't been included into boost yet. I'm building a simple web server as a educational exercise, so libraries like Enet are out since they are UDP only.


Boost ASIO has been accepted into Boost almost 2 years ago.

It's also not a Berkeley socket wrapper, but binds to the platform's most modern networking interface. It may only fall back to basic sockets under rare circumstances.

And something still being in development is better than an abandoned project.

It's not lightweight however, since it's a toolkit for asynchronous programming, not just a socket wrapper, although the resulting code is optimal.

This topic is closed to new replies.

Advertisement