我可以为TCP使用广播或多播吗? [英] Can I use broadcast or multicast for TCP?
问题描述
对于互联网协议(IP),我可以使用多播:
- 在IPv4中: Internet组管理协议(IGMP)
- :多播侦听器发现
- in IPv4: Internet Group Management Protocol (IGMP)
- in IPv6: Multicast Listener Discovery
此外,在示例中,对于UDP,我可以使用:
Also, in example, for UDP I can use:
- 广播 - 将数据包发送到地址范围
- multicast - 将数据包发送到指定地址列表
但是我可以在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屋!