Net::Socket::Accept Method

Accepts a new connection on the socket.

Syntax

Net::Socket@ Net::Socket::Accept(
uint timeoutMs = Math :: UINT_MAX
)

Parameters

uint timeoutMs = Math :: UINT_MAX
The timeout in seconds. Note that the timeout is synchronous and will block the game render loop. To avoid this, set this parameter to 0 and check the return value.

Return value

Net::Socket@
The new socket object representing the connection. If the timeout is reached, the function will return null.

Remarks

None.