TCP 和 UDP 使用不同的操作系统缓冲区?
大家好。
这是场景。
我有端口 8888 供我的程序使用。
我在该端口上构建了一个 TCP 和一个 UDP 侦听器。 (这可以做到,c#允许,因为它们是两个不同的协议)
我的问题是
如果网络流量非常繁忙,TCP套接字可能会拒绝或发信号通知另一端停止发送东西,这就是所谓的拥塞控制,对吗?
那么如果TCP进行拥塞控制,其他端可能不会发送更多数据,在这个“TCP安静期”,UDP通道应该没有那么多流量,对吗?
我想知道TCP流量是否会影响UDP流量?
HI all.
Here is the scenario.
I have port 8888 for my program to use.
I build a TCP and a UDP listener on that port. (This can do, c# allows, because they are two different protocols)
My question is
If the network traffic is very busy, TCP sockets may refuse or signalling the other end to stop sending things, it is called congestion control, right?
So if TCP is congestion controlling, other ends may not send more data, in this "TCP quiet period", UDP channel should have not that much of traffic, right?
I want to figure out the TCP traffic will affect UDP traffic or not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,TCP 和 UDP 流量可以相互影响,因为它们都是 IP 流量。中间路由器不会区分两者,如果出现拥塞,则可能会丢弃其中一个。端口是什么并不重要。
如果数据包被丢弃,TCP 可能会由于拥塞控制而倾向于降低发送方的传输速率,而 UDP 则倾向于仅丢弃数据包。
你到底想问什么?
Yes, TCP and UDP traffic can affect each other, since they are both IP traffic. Intermediate routers will not distinguish between the two, and if there is congestion, either may be dropped. It makes no difference what the port is.
TCP may tend to reduce its transmission rate at the sender due to congestion control if packets are being dropped, while UDP will tend to just drop packets.
What are you really asking?
要回答标题中明确的问题...
TCP 和 UDP 有不同的缓冲区,但它们都与 IP 通信,IP 在内核中具有一个缓冲区,并且当数据包通过网络路由时通常被认为是相等的。
因此,TCP 和 UDP 不会在“传输”层交互,而是在其下面的“网络”、“数据链路”和“物理”层交互。
To answer the explicit question in the title...
TCP and UDP have different buffers but they both talk to IP which has one buffer in the kernel and are generally considered equal as the packets get routed over the network.
So TCP and UDP will not interact at the "transport" layer but will interact at the "network", "datalink", and "physical" layers beneath that.