Cocoa provides great support for the client network, but not for the server side.
At the lowest level, you can use regular BSD sockets.
The next level up is CoreFoundation (simple C, but using Cocoa types). The relevant CoreFoundation APIs are CFNetwork , CFSocket and CFStream ( CFStream is a file stream that can have its source through the network - it is not a System V Stream-style network stream).
In Objective-C, you can watch NSStream , the equivalent of Objective-C CFStream .
Matt gallagher
source share