移动点对点连接
我想制作一些如果根本不需要服务器的话就很棒的软件。
可以在两个移动设备之间建立互联网连接吗?
有人知道我需要为 iPhone、Android 和 Blackberry 研究什么吗?
I want to make some software that would be great if it do not needed a server at all.
It is possible to make an internet connection between two mobile devices?
Does someone have a clue on what I need to research for iPhone, Android and Blackberry?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 UDP 或 TCP 进行直接连接,但会遇到逻辑问题。例如,如果您在同一个 wifi 网络上,一切都会很好。但是,如果一部手机位于具有 NAT 地址的 WiFi 网络上,而另一部手机位于公共地址上,则您将会遇到问题,因为私有 NAT 地址不可路由。如果私话机知道公网话机的IP,则私话机可以进行初次联系。
这就是为什么人们使用服务器来拥有一个中央位置供每个人见面并建立联系。
You can do a direct connection with UDP or TCP but you will encounter logistical problems. For example if you are on the same wifi network all will be good. But if one phone is on a wifi network with a NAT'd address and the other is on a public address, you will have problems since the private NAT'd address is not route-able. If the phone with the private knows the ip of the public address phone,the private ip phone can make the initial contact.
This is why people use server to have one central location for everyone to meet and connections can be established.