- Binds the UDP socket to a local address. Address can be an IP address or a host name. If address is ‘‘ the system binds to all local interfaces using the constant . If port is , the system chooses an ephemeral port.
- Note: This method can only be called before any datagram is sent through the UDP socket, and only once. Otherwise, the system automatically binds the socket to all local interfaces and chooses an ephemeral port as soon as the first datagram is sent. After the local address is set, either automatically by the system or explicitly by , it cannot be changed.