Open In App

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

Like Article
Like
Save
Share
Report

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


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads