我可以对 TCP 使用广播或多播吗? [英] Can I use broadcast or multicast for TCP?
问题描述
对于互联网协议 (IP),我可以使用多播:
- 在 IPv4 中:互联网组管理协议 (IGMP)
- 在 IPv6 中:多播侦听器发现
此外,例如,对于 UDP,我可以使用:
Also, in example, for UDP I can use:
- 广播 - 将数据包发送到地址范围
- 多播 - 将数据包发送到指定地址列表
但是我可以将其中的一些用于 TCP 吗?
But can I use something of these for TCP?
推荐答案
不,你不能.TCP 是一种用于正好在两个端点之间进行通信的协议.与 UDP 相比,它具有可靠传输的特点,这意味着数据包不仅可以发送,而且还期望对等方确认收到数据,如果缺少确认,则数据将被重新传输.并且由于广播和组播只发送数据而从不接收数据,TCP 的可靠性无法在这些协议之上实现.
No, you can't. TCP is a protocol for communication between exactly two endpoints. Compared to UDP it features reliable transport, that means, that packets get not only send, but it is expected that the peer acknowledges the receipt of the data and that data will be retransmitted if the acknowledgement is missing. And because Broadcast and Multicast only send but never receive data, the reliability of TCP cannot be implemented on top of these protocols.
这篇关于我可以对 TCP 使用广播或多播吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!