Question:

With respect to a TCP connection between a client and a server, which one of the following statements is true?

Show Hint

TCP setup uses a three-way (not two-way) handshake, TCP is full-duplex, and either endpoint may initiate close, including both at once, which is the documented simultaneous close / CLOSING state.
Updated On: Jul 22, 2026
  • The client and server use a two-way handshake mechanism before the start of data transmission
  • The server cannot initiate closing of the connection before the client initiates closing of the connection
  • The TCP connection is half-duplex
  • The client and server can initiate closing of the connection at the same time
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Recall the two relevant TCP mechanisms, connection setup and connection teardown. TCP connection setup uses the three-way handshake (SYN, then SYN+ACK, then ACK), and TCP is a full-duplex, connection-oriented protocol in which either endpoint, client or server, may initiate closing the connection, including both doing so at essentially the same moment.

Step 2: Evaluate option (A). It claims a two-way handshake is used before data transmission. This is incorrect, TCP explicitly uses a three-way handshake, SYN from the initiator, SYN-ACK from the responder, and a final ACK from the initiator, so both sides agree on and acknowledge each other's initial sequence numbers before data flows. A two-way handshake would leave the responder unsure whether its own SYN was received, so TCP does not use one.

Step 3: Evaluate option (B). It claims the server cannot initiate closing before the client does. This is false, TCP treats both endpoints symmetrically for termination, either side may send a FIN first to begin an active close, independent of who opened the connection or who is currently sending data. Many real applications, for example a server closing a connection once it has finished sending a response, rely on exactly this server-initiated close.

Step 4: Evaluate option (C). It claims TCP connections are half-duplex. This is false, TCP is explicitly full-duplex, data can flow from client to server and from server to client simultaneously and independently over the same connection, each direction has its own sequence number space and its own acknowledgment stream.

Step 5: Evaluate option (D). It claims the client and server can initiate closing of the connection at the same time. This is true and corresponds to the documented simultaneous close case in the TCP state machine (RFC 793), if both sides send a FIN before receiving the other side's FIN, each transitions into the CLOSING state, and after both FINs are acknowledged both sides move to TIME_WAIT and eventually CLOSED. This is a normal, valid state sequence.

Step 6: Conclusion. Only option (D) accurately describes a true property of TCP connection handling, the other three each contradict a basic property of TCP, a three-way (not two-way) handshake, symmetric closing rights for both endpoints, and full-duplex (not half-duplex) data transfer.

\[ \boxed{\text{Option D}} \]
Was this answer helpful?
0
0