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 s开发者_运维百科ending 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?
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?
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.
精彩评论