Open In App

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

Last Updated : 28 Jun, 2021
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


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads