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

查看:29
本文介绍了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

我已经尝试了前两个.

规范很简单,像标准的 udp 多播一样工作,但结合了 nacks...如果您不需要更多,那就太好了.有一些实现还支持带宽自适应和其他改进.

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天全站免登陆