使用网络浏览器的 P2P
我听说一些 torrent 网站(例如 BITLET 或 MININOVA)允许您从其他用户那里下载,显然,当您打开浏览器时,其他用户也可以从您那里下载。
我想为游戏创建类似的东西,其中: 1. 用户A和B连接到特定网站 2、用户A知道B的IP和端口 3. 用户 A 开始从用户 B 下载一些信息
谁能给我一些提示或关键字来开始?
谢谢!
I've been told that some torrent sites like BITLET or MININOVA allow you to download from other users, and obviously other users to download from you while you have your browser open.
I would like to create something similar for a game, where:
1. User A and B are connected to a specific website
2. User A knows the IP and port of B
3. User A starts downloading some information from user B
Could anyone give me some tips or keywords to start?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的游戏必须编写为浏览器插件,因为浏览器不支持这种事情。看起来 BITLET 使用 java,这可以工作,或者 FLASH 10 也支持套接字连接,因此这将是另一种选择。您可能希望有一个中央服务器来跟踪哪些不同的对等点可用。每个客户端都可以连接到服务器,获取客户端列表,然后为它想要连接的每个客户端创建 tcp 套接字连接。然后,每个客户还可以互相告知其他客户的信息,依此类推。
Your game would have to be written as a browser plugin since browsers don't support this kind of thing. It looks like BITLET uses java, which would work, or FLASH 10 also supports socket connections so that would be another alternative. You'd probably want to have a central server to keep track of what different peers are available. Each client could connect to the server, get a list of clients, then create tcp socket connections to each client it wants to connect to. Each client could then additionally tell each other about other clients, and so on.