The GATE Grind

GATE 2017 CS (CS2) – Question 28

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

Linux supports connected UDP sockets, on which connect has already been called. Which hold? I: One connected UDP socket communicates with multiple peers simultaneously. II: A process can successfully call connect again on an already connected UDP socket.

  1. I only
  2. II only
  3. Both
  4. Neither

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) II only

Explanation

UDP connect sets a default peer and filters incoming datagrams to that peer, rather than establishing a TCP-style connection. The socket is associated with one peer at a time, so I is false. Calling connect again can change that association, making II true. Thus B.

More TCP: Flow Control, Congestion Control, Socket API questions

All TCP: Flow Control, Congestion Control, Socket API questions →