Bidirectional
and full-duplex
are different concepts. For example the Ethernet
is only half-duplex because at a specific time, only one host can send data over the wire, and it cannot send and receive data simultaneously.
So when we use TCP over an Ethernet, I think TCP is only bidirectional or half-duplex.
But here it says TCP is full-duplex. Why?
It is both. It is bidirectional because it can send data in both directions, and it is full-duplex because it can do that simultaneously, without requiring line turnarounds, at the API level.
Of course at a lower level it may be restricted by the available physical layer.
Yes, a TCP connection provides a full-duplex service. Let's understand the meaning of full-duplex. It means exchanging data(sending and receiving) between two entities at the same time. As TCP is a transport layer protocol and transport layer protocols provide logical communication between processes running on different hosts, here also the meaning of full duplex is in this respect.
Here full-duplex means "If there is a TCP connection between Process A on one host and Process B on another host, then application layer data can flow from Process A to Process B at the same time as application layer data flows from Process B to Process A". A TCP connection is also always point-to-point, that is, between a single sender and a single receiver. Remember, the data from Process A is yet to pass through layers below transport layer, similarly the data from Process B will pass through layers below transport layer.
Source: Computer Networking by Kurose, Ross.
By reading the article you posted, I think it's clear that they're talking about TCP supporting full-duplex communication (emphasis mine):
The TCP API is full-duplex. This mean that TCP API allow send data from both side of connection just in same time. Let's see the source of test program to proof:
The output (on FreeBSD) is:
So TCP API is full-duplex and data may be sended from both side at the same time. I think that implementation is full-duplex too, but it need to write more complicated test to recognize. This is implementation dependent of course. And good implementation may does not effect when at least one transport chain link is not full-duplex.
It's certainly bidirectional, since both parties send / receive packets. What exactly do you mean when you ask if TCP is full-duplex?
Both sending and receiving packets at the same time has more to do with the physical component, while TCP is a protocol defining how data should be framed and handled in order to reach the destination.
The NIC (Network Interface Controller) is responsible for sending and receiving physical packets and you would have to check there about the half / full - duplex capabilities.
Wireless (802.11) for example is half-duplex if it is using the same antenna for sending and receiving radio signal.