Here’s an interesting looking abstraction for your local communication needs: ThoMoNetworking!
Writing network code for Cocoa or iPhone/iPad apps isn’t terribly difficult – but it’s not very exciting either.
Want to exchange objects between two processes, on the same machine or remotely, without having to dig down into the C API of Core Foundation? Then ThoMoNetworking is for you.
ThoMoNetworking gives you client and server classes that connect automatically via Bonjour – nothing to do on your side. Pass an object to the server, and it will pop out at the client, and vice versa. If you want, have your object distributed to all connected clients in one go. It couldn’t be much simpler.
No, it really couldn’t. A handful of lines for all this, working with any object conforming to NSCoding:
But wait, there’s more that you get for free with ThoMoNetworking without having to worry about it ever again:
- Sockets – we use them so you don’t have to
- Bonjour – your servers and clients will find each other on the local network automatically, no need to mess with IP addresses and port number
- Handling dropped connections – ThoMoNetworking will immediately reconnect or notify you if the other side is no longer available on the network
- Asynchronous network calls – we handle all the threading for you so that your main thread does not have to wait for the network
All your base are belong to us – works out-of-the-box on OS X, iPhone, and iPad.
That does look pretty darn handy, indeed. Especially if you have some desktop <-> iDevice connectivity in mind. Download the source here!