1.1.24.9 listen

C

int listen(int fd, int backlog)

Description

Listen for connections on a socket.

Parameters

ParametersDescription
fdSocket file descriptor.
backlogMaximum number of pending connections, currently ignored.

Returns

  • 0 - Success.

  • -1 - Error, errno set.

Remarks

errnoDescription
EADDRINUSEThe referred to by fd is not bound to a local port.
EBADFThe argument fd is not a valid file descriptor.
EOPNOTSUPPThe socket is not of a type that supports the listen() operation.