Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Wait for new socket connections on a listening server socket. See function NetSock_Accept() for more information.

Files

net_bsd.h/net_bsd.c

Prototype

Arguments

sock_id

Socket description/handle identifier of listen socket.

p_addr_remote

Pointer to an address buffer that will receive the socket address structure of the accepted socket's remote address (see Note #1), if NO error(s).

p_addr_len

Pointer to a variable to:

    1. Pass the size of the address buffer pointed to by 'p_addr_remote'.
    2. Return the actual size of the socket address structure with the accepted socket's remote address, if no error(s). Return 0 otherwise.

Returned Value

Socket descriptor/handle identifier of new accepted socket, if no error(s).

-1 otherwise.

Note(s)

#1

(a) Socket address structure 'sa_family' member returned in host-order and should not be converted to network-order.

(b) Socket address structure addresses returned in network-order and should be converted from network-order to host-order.

  • No labels