I'm currently on a project where I need to send files and chat messages to users connected via the internet. The running enviroment is Apple Mac(Snow Leopard,Lion). Development environment is Objective C.
I figured that I'll probably will need to use some kind of P2P service, but I can't seem to find one that has an API or libraries for objective c. Chances are I'll have to setup my own P2P server.
As I understand it, the flow of how things is actually going to run, is like this:
Client 1 creates a "chat room"
Client 1 sends this information to the P2P server
Client 2 connects to the P2P server to check for chatrooms
P2P server sends Client 1's chatroom information to Client 2
Client 2 connects to Client 1's chat room (Directly?)
At this point file sharing and chatting should be possible.
Now, my issue is that I know that the above aproach is incorrect. Can anyone give me a more accurate , detailed description on how this would play out?