简体   繁体   English

替代组播

[英]Alternative to Multicast

I am trying to implement an application where a part of it functions similar to chat. 我正在尝试实现其中一部分功能类似于聊天的应用程序。 There are several users and the connection is P2P. 有几个用户,连接是P2P。 The data send from each peer to the others should be serialised objects. 从每个对等方发送到其他对等方的数据应为序列化对象。 I am having difficulty deciding how the data will be send. 我很难决定如何发送数据。 The best choice seemed Multicast , but since its chat i can't afford losing data(that would corrupt the text ??). 最好的选择似乎是Multicast,但由于它的聊天功能,我无法承受丢失数据(那会破坏文本??)的负担。 On the other hand if I use TCP , each peer should be connected to every other peer in order to listen for updates and that sounds wrong (??)/would create a mess. 另一方面,如果我使用TCP,则每个对等方都应连接到其他对等方以侦听更新,这听起来是错误的(??)/会造成混乱。

I would like suggestions as to how I could implement something like that(send data to multiple clients,listen for updates without centralized server).I have already checked JXTA and I am trying to see if its possible to implement this on my own.Also i have read about reliable UDP but haven't found any 'official' solutions/something i could use easily. 我想就如何实现这样的想法提出建议(将数据发送到多个客户端,无需集中式服务器即可监听更新)。我已经检查了JXTA,我正在尝试查看是否有可能自行实现。我已经阅读了有关可靠UDP的文章,但还没有找到我可以轻松使用的任何“官方”解决方案。

ps I have seen similar questions to this one and was hoping for a more personalised help. ps我见过与此问题类似的问题,希望能提供更多个性化的帮助。

看一下zeromq

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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