TCP组播和多线程 [英] TCP multicast and multithreading

查看:167
本文介绍了TCP组播和多线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要提出可以可靠地多播到其他客户端的客户端.这意味着我将使用TCP在多播组内的客户端之间可靠地连接.那不是达到n ^ 2个连接数吗?对我来说,这似乎有点愚蠢. /不应该有一种更容易可靠地组播的方法吗?

I need to come up with clients that can multicast to other clients reliably. That implies I'll be using TCP to connect reliably between clients within a multicast group. Doesn't that come up to n^2 number of connections? That seems a little silly to me. Wouldn't/shouldn't there be a way to more easily multicast with reliability?

UNIX/C

我没有弄清楚多线程是如何发挥作用的.但是我想,如果我要打开n ^ 2个连接,那将是多线程的,这比我想要的还要复杂.

i didn't clarify how multithreading comes into play. but if i was to open up n^2 connections, i figured, i'd be multithreading and that's even more complication than i would want.

推荐答案

有几种可靠的多播解决方案.

There are several reliable multicast solutions.

  • DDS (Data distribution service)
  • Norm Protocol
  • PGM

我已经尝试了前两个.

I've tried the first two ones.

范本很简单,就像标准的udp多播一样工作,但是包含了一些小窍门……如果您不需要更多内容,那就非常好.还有一些实现还支持带宽调整和其他改进.

Norm is simple, works like standard udp multicast but incorporates nacks... excelent if you do not need more. There are some implementations that aslo support bandwidth adaptation and other improvements.

DDS是向前迈出的一步.它的确很棒(我知道RTI的实现并且效果很好),并且具有很多功能以及非常好的设计.它基于可靠的容错能力,并且有一个开放实现.

DDS is a step forward. It's really great (I know the RTI implementation and it works great) and has a lot of capabilities as well as a very good though design. It's based on reliable and fault tolerancy and there's an open implementation.

顺便说一句,至少DDS和NORM不需要n ^ 2连接.它们的工作方式类似于多播udp.

By the way, at least DDS and NORM do not require n^2 connections. They work like multicast udp.

这篇关于TCP组播和多线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆