ListenResult.OK on success, or an error variant.
On success, the listener owns the socket — the caller must eventually call close(). On failure, no cleanup is required.
ListenResult listen(ref EventLoop loop, scope const(char)[] host, ushort port) @trustedStart listening on the requested endpoint.
loop | Event loop to register with. |
host | Host name or IP address to bind to. |
port | Port number to bind to (0 for ephemeral). |
ListenResult.OK on success, or an error variant.
On success, the listener owns the socket — the caller must eventually call close(). On failure, no cleanup is required.