views:

99

answers:

1

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!

A: 

Bonjour is just a way to announce services — not a replacement for tcp/udp.

The services still use tcp or udp.

ASIHTTPRequest makes your life easier.

BTW: 25% accept rate doesn't look nice. Might stop people from answering

edit
As I mentioned above: tcp is a basic protocol for services, while Bonjour can announce services. So see this tutorial and dont care about the Bonjour stuff.

May google be with you!

vikingosegundo
Thanks for the answer, but I'm afraid it doesn't help me. I'm searching for a sample TCP connection in objective c, and that's now that..
EiTkoCaT