net.bind()
Binds a UDP socket.
Signature
net.bind(host, port[, options])
Parameters
Host, port, and optional settings above.
Returns
UDP socket.
Behavior
Forces UDP while retaining other applicable settings.
Errors
Address in use, denied permission, DNS or invalid settings.
Example
use net
s = net.bind('127.0.0.1', 0)
assert(net.local(s).port > 0)
net.close(s)