I've been looking at window's sockets, and realise that they are pretty much the same as unix sockets with a few minor differences. As I am designing my game to be cross platform however, I thought I'd look into a cross platform network library. I had a quick look at the ones under librarys, networks on allegro.cc and looked at HawkNL, but wondered if anyone has any experience with any of these libraries and which would be recommended.
HawkNL. And no, there are no tutorials.
edit: (But my sekrit projekt has a HawkNL tutorial in the works, don't expect it ever finished.)
You can add a couple of #ifdef WIN32 as my example and be done with the differences. Only lacking OS2 support :/
I second HawkNL and no, there are NO tutorials.
Ive been thinking about making a tutorial for HawkNL for awhile, but I just dont have enough time
. Maybe this summer.
From what I've seen its probably just easier for me to use winsock, but put a load of #defines in to allow linux support etc.
I've thrown together a program which lets the computer act as a server or client, where the client sends all keyboard presses to the server which then appear on screen. At the moment when you choose to act as a server, the program is frozen by the listen() function until a client connects. How can I do this in the background, e.g.
while(looping)
{
check_for_clients();
do_something_else();
}
edit: oh and I dont like the idea of opening seperate threads etc
Blocks at accept. This has been asked recently. I wrote an example here. Check it out.
James, i can give you my defines to make it all compat, if you like.
rey: thats great I'll look over your code
baf: that would be a great help too
I tried to use HawkNL. I failed
. Knowing absolutely nothing about networking, and the lack of any tuts had me throwing the towel in after 2 hours.
Since docs and tuts are so important, why is HawkNL so great if no one can use it?
Well, I couldn't find any tuts, but I did find a site raving about how good it is
.