The GATE Grind

GATE 2014 CS (CS2) – Question 34

Computer Networks · TCP: Flow Control, Congestion Control, Socket API · 1 mark · Multiple choice

Which socket API converts an unconnected active TCP socket into a passive socket?

  1. connect
  2. bind
  3. listen
  4. accept

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) listen

Explanation

listen marks a suitable unconnected socket as a passive endpoint accepting incoming connection requests. bind supplies its local address; connect initiates an outgoing connection; accept obtains a connected socket for a pending request. Thus **listen,C**.