It is unfortunate that Java is not supported on the iPhone, because the JXTA infrastructure would solve your problem easily.
What you are looking for is TURN , as a P2P implementation. Iphone needs to initiate a connection to the server in order to punch a hole in NAT, and yes, it needs to be supported (even if you are exploring more complex implementations such as STUNT to bypass NAT).
With TURN, the server must transfer messages between IPhones, STUNT, messages are transmitted directly between devices, but it is rather difficult to implement them correctly.
source share