Android P2P理念

发布于 2024-10-22 06:12:43 字数 547 浏览 5 评论 0原文

我一直在寻找一些方法来模拟 Android 上的游戏的 Peer 2 Peer,我能想到的最好方法是将 Android 连接到服务器,然后通过该服务器进行路由。我只是在寻找有关解决该解决方案的方法的一些想法,以便您可以逐字输入某人的电话号码并尝试连接到他们。

通过使用服务模块来检查传入的短信(该短信将被正确格式化以便检测),它会解释另一部手机正在尝试请求连接到另一个 Android 应用程序。如果找到该应用程序,它将提示用户是否希望连接到其他人。如果是,他们的手机会向原来的手机发回一条短信,原来的手机上也安装了消息系统,表明它想要连接,并且这是我当前的 IP 地址。然后,原始电话或主机电话将通过互联网打开与其他用户电话的连接,此时新建立的连接可用于来回传输信息。

基本列表布局 服务模块: - 写入/接收格式化文本消息以提醒/验证某人正在尝试连接到他们的应用程序 - 发件人尝试与收件人电话建立连接,收件人电话建立连接并传递到所需的应用程序,同时发回确认包 - 确认后,发送者手机将连接传递到原始所需的应用程序。

任何想法、想法、建设性批评都会有所帮助。
* 抱歉,粗体,但我希望你明白为什么。

I've been looking around for some way to simulate Peer 2 Peer for games on the android and the best way I've been able to come up with is connected an android to a server and then routing through that server. I'm just looking for some thoughts on my way of solving the solution so that you could literally type in someones phone number and try and connect to them.

By use of a service module to check incoming text messages, which would be properly formatted for detection, it would interpret that another phone is trying to request a connection to another one of the androids applications. If the application is found it would then prompt the user as to if they wished to connect to the other person. If yes, their phone would send back a text message to the original phones, which also has the messaging system installed on it, which states it would like to connect and that this is my current IP address. The original phone, or host phone, would then open a connection with the other users phone via the Internet at which point the newly made connection could be used to transfer information back and forth.

Basic list layout
Service module:
- Writes/Receives formatted text messages to alert/verify someone is trying to connect to an application of theirs
- Sender attempts to make a connection with the recipient phone, which takes connection and passes to desired application along with sending back a confirmation package
- On confirmation Sender phone passes connection to original desired application.

Any thoughts, ideas, constructive criticism would be helpful.
* srry for bold, but I hope you understand why.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秋叶绚丽 2024-10-29 06:12:43

我能想到的最好方法是将 Android 连接到服务器,然后通过该服务器进行路由

这称为 TURN P2P 实现。您还想了解 STUNT 实现。您可能会对 JXTA P2P 框架感兴趣。

the best way I've been able to come up with is connected an android to a server and then routing through that server

This is called TURN P2P implementation. You want to read about STUNT implementations too. You'll probably be interested in the JXTA P2P framework.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文