AddressIPSocket.accept

Calls accept() to accept a connection from a listening socket, sets this.fd to the accepted socket file descriptor and memorises the remote address and port.

  1. int accept(ISelectable listening_socket, InAddr remote_address, SocketFlags flags)
    class AddressIPSocket(bool IPv6 = false)
    override
    int
    accept
    (
    ISelectable listening_socket
    ,
    ref InAddr remote_address
    ,
    SocketFlags flags = SocketFlags.None
    )
  2. int accept(ISelectable listening_socket, InAddr remote_address, bool nonblocking)
  3. int accept(ISelectable listening_socket, SocketFlags flags)
  4. int accept(ISelectable listening_socket, bool nonblocking)

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

flags SocketFlags

socket flags, see description above

Return Value

Type: int

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

Meta