This article is from the Mac Programming FAQ, by Jon Watte firstname.lastname@example.org with numerous contributions by others.
There are some problems with that. MacTCP, the Mac Toolbox
implementation of TCP/IP, doesn't have an API that looks at all like
Berkley sockets. For instance, there is ONE paramater-block call to do
a combined listen()/accept()/bind() - sort of. I have heard that there
may be a socket library available by ftp from MIT but haven't seen it
There is also a pretty good C++ TCP implementation called GUSI which is
easily handled, and it also is callable from C using the Berkley socket
API. Apart from TCP, it also handles "standard" Mac network protocols
such as ADSP. The big disadvantage is that it is currently only
implemented for MPW. The ftp site is nic.switch.ch,
I can also recommend the Communications Toolbox; for the price of using
an API that is a bigger pain in the ass than configuring Windoze to use
a new peripheral device, you get the benefit of being able to use any
kind of connection (TCP tools are available).
Instead of the Comm Toolbox, one might use Apple's much improved Open
Transport architecture. Preliminary docs are available for ftp at
seeding.apple.com. Apple's new networking products team seems to have
it's head screwed on tight. A refreshing change.
Novell and Wollogong offer commercial socket-like libraries.