The socket must be a TCP socket that has been bound to a local address. The nMaxBacklog parameter indicates the maximum length for the queue of pending connections. If nMaxBacklog is larger than the system maximum, it will be silently reduced to the system maximum.
int ISockPort_Listen(ISockPort* po, int nBacklog)
- AEE_SUCCESS: socket has been successfully placed into listening mode
IPORT_WAIT: (AEE_AF_INET and AEE_AF_INET6 only) The operation cannot be
completed at present. This can occur when a network
connection is being established (see ISockPort_Writeable()).
AEE_NET_EBADF : socket is not open
AEE_NET_EOPNOTSUPP : The socket is not capable of listening (UDP)
AEE_NET_EFAULT : backlog parameter is invalid
AEE_NET_ENETNONET : network subsystem unavailable for some unknown reason
AEE_NET_ENETINPROGRESS : network subsystem establishment currently in progress
AEE_NET_ENETCLOSEINPROGRESS: network subsystem close in progress.
AEE_NET_EINVAL : Socket is not bound, or already listening
AEE_NET_EISCONN : socket is connected
AEE_NET_ENOMEM : out of memory
Other error codes are also possible.