UDT Reference: UDT Functions

listen

The listen method enables a server UDT entity to wait for the peer side to connect to it.

int listen(
  UDTSOCKET u,   
  int backlog 
);

Parameters

u
[in] Descriptor identifying a bound, unconnected socket.
backlog
[in] Maximum length of the queue of pending connections.

Return Values

On success, 0 is returned. Otherwise, UDT::ERROR is returned and the specific error information can be retrieved by getlasterror.

Error Code Comment

5002

u is already connected.

5004

u is an invalid UDT socket.

5005

u is not bound.

5007

u is set up to support rendezvous connection.

Description

The listen method let a UDT socket enters listening state. The socket must call bind before a listen call.

See Also

bind, connect, accept