As you might know, AnyBus was inspired by the networking code in the Odin library (which now also uses AnyBus). The code in Odin initially used SDL_net as a networking library, but ran into some problems with packets not comming through and random crashes all over the place. This lead to the realization that another library was needed, so i found Netxx.
But when i started developing AnyBus, i decided to give SDL_net another try, because surely - it was just because i was too stupid to use SDL_net. And yes, SDL_net looked great at the start, but when i started writing a simple test client/server application sending files over the AnyBus, it turned out that SDL_net crashed and burned. I spent many a time looking for the bug, but the code looked good. So i switched to Netxx - and i now swear that i will never use that pesky SDL_net library again. It is uncooperatively already at the start, doesn't support non-blocking operation ... come on! Every library needs that.
This page is not really meant as a rant on SDL_net, however i needed to shout a bit. Thanks for listening :-) And i later found out that SDL_net actually works fine, it was just my understanding of networking coding that lacked.
This page is supposed to be about comparing libraries for doing networking in a C++ application. The libraries i reviewed for Odin (and incidentally for AnyBus is described below, with pros/cons):
Netxx
The most loosely licensed of them all, released under a BSD license, and working great as far as the testing was concerned.
That is: once i got it to compile. It was the last library that i tested because it used jam to build. Jam apparently doesn't create shared libraries. But i ended up autotoolizing the package - and subsequentially using this library.
Peter Jones calls this a modern c++ library, and the library actually feels modern, there even is one or two templates in it.
The only thing i would like from the library, is a way to convert integers of different sizes to- and from- network order. I had to steal these functions from the SDL and SDL_net libraries.
And official Debian packages wouldn't hurt, but by doing autotools'ing the library i think i have done my part (but maybe i'll package the library anyway, just to get it on the road, i'm not a Debian developer).
Well done Peter Jones!
http://pmade.org/software/netxx/
skstream
The prettiest of the bunch, looks well designed and well tested. Is in debian packages and uses standard build system. Testing showed good results. The problem with this library, however, lies in the license, it is GPL, and as such i have little interest in it - i wish to be able to license my libraries under the LGPL.