GATE Exam  >  GATE Questions  >  Consider a socket API on Linux machine that s... Start Learning for Free
Consider a socket API on Linux machine that supports UDP socket. 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.
  • a)
    I only
  • b)
    II only
  • c)
    Both I and II only
  • d)
    Neither I nor II
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Consider a socket API on Linux machine that supports UDP socket. A con...
I. A connected UDP socket can be used to communicate with multiple peers simultaneously is WRONG : Even if UDP is connectionless, every UDP socket has a single specified IP number and port number to connect to. Therefore we can not use same socket to connect to multiple peers simultaneously. II. A process can successfully call connect function again for an already connected UDP socket is RIGHT : We can call connect again to connect to a new peer and disconnect previous peer if implementation allows
View all questions of this test
Most Upvoted Answer
Consider a socket API on Linux machine that supports UDP socket. A con...
Explanation:

Connected UDP Socket:
- A connected UDP socket is a UDP socket on which the connect function has been called, which binds the socket to a specific remote address and port.

Statement I:
- A connected UDP socket can only communicate with the specific peer it is connected to. It cannot be used to communicate with multiple peers simultaneously. Each connected UDP socket can only communicate with one specific peer.

Statement II:
- Once a UDP socket is connected, attempting to call the connect function again for the same socket will result in an error. The connect function can only be called once for a UDP socket.
Therefore, the correct answer is option 'B' - II only.
Explore Courses for GATE exam

Similar GATE Doubts

Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer?
Question Description
Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer?.
Solutions for Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer?, a detailed solution for Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a socket API on Linux machine that supports UDP socket. 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.a)I onlyb)II onlyc)Both I and II onlyd)Neither I nor IICorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev