Network library wanted

For a very small project which I'm working on from time to time, I need a network library. I've searched the web for a fitting one, but I cannot decide which one would be best. Features I need would be:
  • open source. zlib/bsd style preferred, no GPL.
  • must be stable, tested and fast
  • cross platform if possible
I also thought about creating my own library, something like irrNET, but I've got a 3D library to manage already, and this would be too much time consuming. Altough it would be a lot of fun. :) I also thought about using RAKnet, but I need something really free. Ideas?

22 comments, already:

Check out enet (,, but I don’t know if this is the most up to date enet page)

It’s a reliable layer for UDP (written in C) and was used in the cube and sauerbraten engines. You can’t compare this to raknet though because raknet is a more high level network library.
peon_grunt - 11 08 06 - 21:37

Have you checked ACE?
I haven’t used it by myself, but it seems to be a C++ abstraction layer for stuff like networking, and it even seems to be cross-platform.
ak (link) - 12 08 06 - 00:13

Make an IrrNET – You needed an engine – here’s Irrlicht
You needed a map editor – IrrEdit
Now you need a Network Library why not make your own? We would all benefit greatly from it :) – one less library to find on our own ;)
RustyNail - 12 08 06 - 00:14

i’d also say: go for it :P
i’d even help out. started my own little netcode stuff for a serveremulator project… was fun and works!
bakkdoor (link) - 12 08 06 - 00:41

Hehe, one day “Irr” will be a full triple-A brand – I see it coming :)

Who needs Nike anyway?
Gauntlet - 12 08 06 - 00:55


and I do too (to Gauntlet)
RustyNail - 12 08 06 - 02:22

OK, this depends on what protocol you want to use (TCP or UDP).

For UDP, eNet is the way to go. BSD-style license, decent API & performance, and more importantly – doesn’t tie you into an architecture you may not like.

For TCP, I use STLPlus (which I also use for other things, but the TCP support is good too). However, this may not be up your ally (using STL as it does). However, I find it very dependable and flexible (and nicely enough – doesn’t require Windows message handling or threading to work). BSD-style license too.

I’ve used both in several different projects and they are what I am sticking to until something better comes along.
Eternl Knight - 12 08 06 - 03:31

i think wxwidgets comes with networking features too. i don’t know what you want to do though and if it would fit to your project.
hugo - 12 08 06 - 03:53

You could talk to Rak’kar and make an agreement that fits you. He is a very helpful guy, and might want to help a fellow developer like you. ;)
bicunisa (link) - 12 08 06 - 04:26

I started one (under the project name Sokuwort on sourceforge), but I havent had much chance to work on it :/

Sorry man
The Anaconda - 12 08 06 - 06:26

check out boost.Asio (
pyrokar - 12 08 06 - 09:52

there is also a non-boost version of asio –
if the boost dependency is too big
nebukadnezzar - 12 08 06 - 10:30

Try zoidcom :)
the developer is a nice person and the libs very nice and good documentaded
Halan (link) - 12 08 06 - 12:46

ah sry thats not the license you want
Halan (link) - 12 08 06 - 12:53

As some fellows said before, take eNet. It does everything you want, and the mailing list and the primary author are very helpful and responsive.
znarf (link) - 12 08 06 - 13:15

Another vote for Enet.
Jedive - 12 08 06 - 14:17

most “network libraries” tend to be little more than some sort of light wrapper around BSD sockets. Raknet or Zoidcom are definitely exceptions, perhaps enet, i’m not familiar with it. One thing I have read a lot of places is that a network library really works best if it makes sense with your scenegraph, with your particular 3d engine setup, which is why most engine-writers tend to roll their own, to make it work within their OO engine framework.
so, chances are the best solution is to make your own, if you want it to work well with irrlicht.
buhatkj - 12 08 06 - 22:24

Did you drop an eye to Torque Network Library?
Zitzu - 13 08 06 - 12:30

And Niko, what’s your library of choice?
or are you going to use the (BSD) sockets directly?
nebukadnezzar - 14 08 06 - 16:09

thanks for all the suggestions, I’m going to take a look into aiso and enet, but who knows – maybe I’m still going to write my own small lib and then release it for free. But this could take some time before I’m starting with it. :)
niko - 14 08 06 - 18:33

You should definitely check out the “Game Networking Engine”. It covers all the stuff like serialization, threading and network messages and uses the portable HawkNL library.
Cygon (link) - 15 08 06 - 07:58

Whoops, the URL was
Cygon (link) - 15 08 06 - 07:59

Displayed name:  
Remember personal info?
Website (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile


Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.