Which network library do you recommend? (Windows)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
jimburnettva
Posts: 13
Joined: Fri Feb 19, 2010 5:07 pm
Contact:

Which network library do you recommend? (Windows)

Post by jimburnettva »

I searched for "networking" and "network libraries" and came up empty.

Linux is a no-brainer as I would just use UNIX sockets and be done with it. Not to mention all the native libraries out there.

For windows, I've been looking into few various methods.

I got namespace System::Net::Sockets working but that requires that I use C++/CLI which makes me feel dirty and it also makes it hard to port to Linux and back.

irrNet: no longer availible.
Practical C++ sockets: "Not for production use", stability issues
HawkNL : Change log hasn't change from 2004..?

irrNetLite looks interesting. Anyone got experience in this?


I suppose I could use Winsock....but then it's all jacked up for Linux...

Just looking for some advice.

Flame away and thanks in advance!
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Re: Which network library do you recommend? (Windows)

Post by slavik262 »

jimburnettva wrote:Linux is a no-brainer as I would just use UNIX sockets and be done with it. Not to mention all the native libraries out there.

For windows, I've been looking into few various methods.
Then just use winsock 2. It's native, and it's almost identical to Berkley (UNIX) sockets. Just build some wrapper classes and you'll be good to go. I'm not sure where you got the idea that it's so different from Linux.
Last edited by slavik262 on Tue Sep 07, 2010 8:09 pm, edited 1 time in total.
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Re: Which network library do you recommend? (Windows)

Post by Bate »

Yep, I am using IrrNetLite for a project at the moment. It works like a charm and is easy to use. Check out the last page if you want it multithreaded (which I highly recommend).
Never take advice from someone who likes to give advice, so take my advice and don't take it.
jimburnettva
Posts: 13
Joined: Fri Feb 19, 2010 5:07 pm
Contact:

Post by jimburnettva »

Slave,
Winsock2 looks interesting. Is ws2_32.lib still used for linking?



Bate,
Does the IrrNL let you have access to the lower level methods? Currently I have 3D model information stored in a database and I populate my Scene with the information coming from that database.

I guess what I'm asking is, can I define my own packets and also use TCP/UDP combination (TCP for authentication, UDP for the hi-res data...) with IrrNL...
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Note sure. It's been a while since I've done networking work, but Winsock has always met my needs.

Here's the documentation:
http://msdn.microsoft.com/en-us/library ... S.85).aspx

A good guide to getting started:
http://msdn.microsoft.com/en-us/library ... S.85).aspx

The BB treats the links weird. Make sure you include the "(VS.85).aspx" when you put in the URL.
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post by Bate »

jimburnettva wrote:I guess what I'm asking is, can I define my own packets and also use TCP/UDP combination (TCP for authentication, UDP for the hi-res data...) with IrrNL...
Yep, you can easily extend it and add your own packets. Also, there is already a lot of irrlicht-related stuff built-in. IrrNet is based on enet which means UDP only.
Never take advice from someone who likes to give advice, so take my advice and don't take it.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

i would suggest then irrNetLite or enet directly. bc then u can still create tcp connection pretty easily with the same system. and you don't have to worry about system dependens bc its crossplatform.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
booe
Posts: 76
Joined: Thu Jul 29, 2010 2:12 pm

Post by booe »

Winsock.
Brainsaw
Posts: 1243
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

My vote goes to IrrnetLite. Works fine for me (although my current usage in "Stunt Marble Racers" is quite a hack, but I'm planning to add networking to my IrrOde wrapper in the future, and I already have some ideas on how to get that done in a better way).
Image
Dustbin::Games on the web: https://www.dustbin-online.de/
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

RakNet ?

Oh and btw: Winsock is almost POSIX compatible. IIrc you have one or two things that don't exist in Winsock. Anyway porting posix sockets to windows and back involves about 5 minutes of googling and two or three #ifdef blocks in your code.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
jimburnettva
Posts: 13
Joined: Fri Feb 19, 2010 5:07 pm
Contact:

Post by jimburnettva »

Yeah I just made my own C++ wrappers around Winsock2 and then when I compile on Linux is super easy to re-compile.

Thanks for the replys!

(p.s. I don't get email notifications from this site, something messed up?)


Sylence wrote:RakNet ?

Oh and btw: Winsock is almost POSIX compatible. IIrc you have one or two things that don't exist in Winsock. Anyway porting posix sockets to windows and back involves about 5 minutes of googling and two or three #ifdef blocks in your code.
CuteAlien
Admin
Posts: 9983
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Just to mention it - there is also boost::asio. Not exactly the easiest to use, but one of the things it offers are wrappers around the sockets libraries on each OS.

And about email notifications - sorry, we can't do those on SF-forums.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply