Home » Computer Networks » Computer networks miscellaneous » Question

Computer networks miscellaneous

  1. 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.
    1. I only
    2. II only
    3. Both I and II
    4. Neither I nor II
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.



Your comments will be displayed only after manual approval.