Method Stdio.UDP()->bind()
- Method bind
UDP bind(int|string port, string|void address, string|bool no_reuseaddr)
- Description
Binds a port for receiving or transmitting UDP.
- Parameter no_reuseaddr
If set to
1
, Pike will not set theSO_REUSEADDR
option on the UDP port.- Note
SO_REUSEADDR
is never applied when binding a random port (bind(0)
).In general,
SO_REUSEADDR
is not desirable on UDP ports. Unless used for receiving multicast, be sure to never bind a non-random port without settingno_reuseaddr
to1
.- Throws
Throws error when unable to bind port.