0 on success, or -1 with errno set.int bind(ref EventLoop loop, scope const(char)[] host, ushort port) @trustedBind the socket to a local endpoint.
On success, EVE owns the socket fd — the caller must not close it directly. Must eventually call close() or dispose(). On failure, no cleanup required.
loop | Event loop to register with. |
host | Local address to bind to (e.g., "0.0.0.0" or "::"). |
port | Port number to bind to (0 for ephemeral). |
0 on success, or -1 with errno set.