GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 18

GATE CSE 2017 Set 2 Q18

Computer Networks · Transport, Congestion Control & Traffic Shaping · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q18 1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Transport, Congestion Control & Traffic Shaping

Question 18, GATE 2017: On Linux, a connected UDP socket is one on which connect has been called. Assess I:A connected UDP socket can communicate with multiple peers simultaneously. II:A process can successfully call connect again on an already connected UDP socket. A:I only. B:II only. C:both. D:neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Our answer: B under single bidirectional peer interpretation

1. UDP connect does not establish a TCP-like reliable connection. It associates a default destination with the socket and ordinarily restricts incoming datagrams to that peer, allowing send/write calls without specifying an address.

2. Another connect call can change the peer association, so II is true. Under the exam's interpretation of communicate as simultaneous default, bidirectional peer associations, I is false and the intended answer is B.

3. Preserve the Linux API caveat: a connected UDP socket may still send a datagram to another destination explicitly supplied to sendto/sendmsg. Thus it is inaccurate to say that a connected UDP socket can never send to multiple peers. The unique B answer relies on the bidirectional/default-peer interpretation.

Original paper, page 7 · Answer key