-
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.
-
- I only
- II only
- Both I and II
- Neither I nor II
- I only
Correct Option: B
A process can successfully call connect function again for an already connected UDP socket for one of two reasons:
(1) To specify a new IP address and Port.
(2) To unconnect the socket.
A connected UDP socket have two function
(1) Bind () function used to create local address.
(2) Connect () function is specifying remote address. Where as, A unconnected UDP socket has only just a Bind () function. So, option (b) is correct.