IPSocket.accept

Calls accept() to accept a connection from a listening socket, sets this.fd to the accepted socket file descriptor.

Parameters

listening_socket ISelectable

the listening socket to accept the new connection from

remote_address InAddr

filled in with the address of the peer socket, as known to the communications layer

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