UdpSocket.bind

int bind(ref EventLoop loop, scope const(char)[] host, ushort port) @trusted

Bind the socket to a local endpoint.

Parameters

loopEvent loop to register with.
hostLocal address to bind to (e.g., "0.0.0.0" or "::").
portPort number to bind to (0 for ephemeral).

Returns

0 on success, or -1 with errno set.