# _Io_Listen

Server-side only. Listens for incomming connections.

_Io_Listen($iPort, $sAddress = @IPAddress1, $iMaxPendingConnections = Default, $iMaxDeadSocketsBeforeTidy = 1000, $iMaxConnections = 100000)

## Return Value

integer. Null + @error if error

## Remarks

If `$iMaxDeadSocketsBeforeTidy` is set to `False`, you have to manually call `_Io_TidyUp` to get rid of dead sockets, otherwise the `iMaxConnections + 1` client that connects, will be instantly disconnected.

## Related

_Io_Connect