/ comp / gb.net / udpsocket / bind
UdpSocket.Bind (gb.net)
Syntax

    SUB Bind ( Port AS Integer )

Binds a socket to a port, so the object can start sending and receiving data.

Port value must be a number between 0 and 65535:

- 0: binds socket to any available port in the system. This is the usual operative for UDP clients.
- 1 -> 65535: binds socket to that port, if possible. This is the usual operative for UDP servers.

This function can be used when the Status property is zero (inactive) or lesser than zero. Otherwise, an error will raise.