# Bind

`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 status property is zero (inactive) or lesser than zero. Otherwise, an error will raise