I have not yet come across an iPhone specific tutorial but if you search for tutorials on BSD sockets that should get you started.
There is sample code for using bonjour on apples site but i found using the BSD socket route much easier if you are communicating with devices such as windows pcs.