...
net_bsd.h/net_bsd.c
Prototype
Code Block |
---|
int accept ( int sock_id,
struct sockaddr *p_addr_remote,
socklen_t *p_addr_len); |
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 if NO error(s).
p_addr_len
Pointer to a variable to:
- Pass the size of the address buffer pointed to by 'p_addr_remote'.
- 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.