Skip to content
GATEiit

GATE CSE 2017 Session 2 Q28: Connected UDP sockets: multiple peers and calling connect again

Syllabus topic: TCP: flow control and congestion control; socket API

Question

Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which connect function has already been called. Which of the following statements is/are CORRECT?

I. A connected UDP socket can be used to communicate with multiple peers simultaneously. II. A process can successfully call connect function again for an already connected UDP socket.

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2017 final answer key)

Concept used: Calling connect on a UDP socket fixes a single default peer; it can be called again to change or remove that peer.

Concept notes

Loading notes…

First step: Recall what connect does for a UDP socket: it records one remote address and filters datagrams to that peer.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on TCP: flow control and congestion control; socket API

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2017 Session 2 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key