UdpSocket.Port (gb.net)

Property Port As Integer

Return or set the port number used for binding the UDP socket.

It 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.