beej's guide is a great place to start, but just about everyone and their dog has a tutorial on socket programming. It's particularly good because the Windows socket API is almost identical, just a couple of different includes and a couple of extra restrictions.

Searching Google should turn you up heaps of stuff -- don't look for mac-specifics, in order of preference: BSD, Linux, Windows, but all should be helpful.

On a related subject, is it possible to debug a networked app on one machine if one is running OSX?

The idea would be to create two instances and have one of them connect to the other -- all inside the same machine. One would have to use some special Internet address for connecting to oneself, of course. Something like 127.0.0.1 (nowhere.loopback.edu).

Quote:Originally posted by lpetrich On a related subject, is it possible to debug a networked app on one machine if one is running OSX?
The idea would be to create two instances and have one of them connect to the other -- all inside the same machine.

check out the uDevGame entry "RoboHunt." After you d/l it - make a copy - start both copies - set one up as the server - and connect from the other copy. Neato.