API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ISOCKET_ACCEPT()

Brew Release
Brew MP 1.0.2
See Also
ISOCKET_Listen() ISOCKET_Readable()
Description
The accept function is used on a listening TCP socket to retrieve an incoming connection from the backlog queue (see ISOCKET_Listen()). The first backlog queued connection is removed from the queue, and associated with a new socket (as if you called OEMSocket_Open). The newly created socket is in the connected state. The listening socket is unaffected and the queue size is maintained (i.e. there is no need to call listen again.)
Params
ps
[in]:
Pointer to the listening ISocket interface
pps
[out]:
Pointer to the newly accepted ISocket interface
Interface
  • ISOCKET
Prototype
  •    int ISOCKET_Accept(ISocket * ps, ISocket ** pps);
    
Return
  • AEE_NET_SUCCESS: A newly accepted socket has been returned via pps. AEE_NET_WOULDBLOCK: No new sockets are available now; try again later. (See ISOCKET_Readable().) AEE_NET_ERROR: The operation failed. The specific error code can be retrieved by calling ISOCKET_GetLastError().
Side Effect
  • None.
Comments
This is not a formal member of ISocket, instead it is a wrapper around ISOCKET_IOCtl().