GateAI
TCP Flow and Congestion Control

GATE CSE 2015 Set 2 · Q20

MCQ1 markEasy

Time

Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIX socket API.

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) bind, listen, accept, recv

TCP Flow and Congestion Control

In a standard TCP connection using the UNIX socket API, the server process follows these steps:

  1. socket() creates an endpoint for communication.

  2. bind() assigns a local protocol address (IP address and port) to the socket.

  3. listen() marks the socket as passive, indicating that it will be used to accept incoming connection requests, and specifies a backlog queue.

  4. accept() extracts the first connection request on the queue of pending connections and creates a new connected socket.

  5. recv() reads data received from the client over the established connection.

Therefore, the correct invocation sequence is bind, listen, accept, recv, which corresponds to option (B).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This TCP Flow and Congestion Control previous year question is Q20 of the GATE CSE 2015 Set 2 paper. Find more GATE CSE PYQs on TCP Flow and Congestion Control in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related TCP Flow and Congestion Control PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

TCP Flow and Congestion Control in GATE CSE

TCP Flow and Congestion Control has 23 GATE CSE PYQs across 21 papers from 2012 to 2026. 10 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 2.

How GATE tests TCP Flow and Congestion Control

More from GATE CSE 2015 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 2 · Q20 · MCQ

Identify the correct order in which a server process must invoke the function calls accept , bind , listen , and recv according to UNIX socket API.

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.