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

Developer

API Reference

ISOCKET_LISTEN()

Brew Release
Brew MP 1.0.2
See Also
ISOCKET_Accept() ISOCKET_Writeable()
Description
This function performs a passive open for connections, such that incoming connections may be subsequently accepted. The socket must be a TCP socket that has been bound to a local port. The nMaxBacklog parameter indicates the maximum length for the queue of pending connections. If nMaxBacklog is less than one, it will be silently increased to one. If nMaxBacklog is larger than the system maximum, it will be silently reduced to the system maximum.
Params
ps
[]:
Pointer to the ISocket interface to put in listening mode
nMaxBacklog
[]:
The maximum number of pending connections
Interface
  • ISOCKET
Prototype
  •    int ISOCKET_Listen(ISocket * ps, int nMaxBacklog);
    
Return
  • AEE_NET_SUCCESS: The socket has been placed in listening mode. AEE_NET_WOULDBLOCK: Unable to listen now; try again later. (See ISOCKET_Writeable()) 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()