ISocket.accept

Accepts a connection from a listening socket and sets this.fd to the accepted socket file descriptor.

See description above for further information.

Parameters

listening_socket ISelectable

the listening socket to accept the new connection from

nonblocking bool

true: make the accepted socket nonblocking, false: leave it blocking

Return Value

Type: int

the file descriptor of the accepted socket on success or -1 on failure. On failure errno is set appropriately.

Meta