Extracted from Pike v8.0 release 28 as of 2015-09-20.
   

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 the SO_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 setting no_reuseaddr to 1.

Throws

Throws error when unable to bind port.