Open In App

GATE | GATE-CS-2014-(Set-2) | Question 65

Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket.
(A) connect
(B) bind
(C) listen
(D) accept

Answer: (C)
Explanation: listen() marks the socket referred to by sockfd as a passive socket, that is, as a socket that will be used to accept incoming connection requests using accept().

Source: http://linux.die.net/man/2/listen
Quiz of this Question

Article Tags :