I’d like to use iOS device as a TCP client, but I can’t find an understandable API/guide/sample of how to do that. I tried SimpleNetworkStreams and PictureSharing, but they are both using Bonjour. I can make UDP connections easily, learned via UDPEcho, but I can’t find as good sample as UDPEcho for TCP. I want a simple example of connecting to a server, and print in the screen all the incoming messages from the server – that’s it.
Thanks!
Have you looked at the AsyncSocket project?
http://code.google.com/p/cocoaasyncsocket/
It supports TCP and UDP. To find it, I googled “cocoa tcp socket class”.
Note:
The project was moved to https://github.com/robbiehanson/CocoaAsyncSocket