简体   繁体   中英

Peer to peer via ip address for iOS

I have ip addresses of two different iOS Devices which are connected to Internet. Now, I want to establish a peer-to-peer connection between them.

I had done this locally with Wifi and it worked properly. But I dont know how to establish this connection with an IP address. I want that I can connect them from anywhere, so I need to connect via Ip address. Also, is this possible without developing any server? Please help. Thanks.

I couldn't find any exact solution for this problem but one approach could be you can have two ios devices connected with a network having same public IP. So indirectly both ios devices will be connected to the same network.

What you had done with wifi is probably an Ad-Hoc connection. Ad-Hoc is when you connect 2 wifi devices without any Access Point in the between.

You do not have to do that on the Internet, your devices are already connected to a network. What you need to do is to find out what their IP addresses are and provide them to eachother.

In case your iOS devices are NATed behind a router, you must forward the port which you want to use from the router to the iOS device.

Here are guides for port forwarding for all the existing routers: http://portforward.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM