UdpSocket.bind

Bind the socket to a specific port.

Binding the socket to a port is necessary for being able to receive data on that port. You can use the special value Socket.AnyPort to tell the system to automatically pick an available port, and then call getLocalPort to retrieve the chosen port.

class UdpSocket
Status
bind

Parameters

port ushort

Port to bind the socket to

address IpAddress

Address of the interface to bind to

Return Value

Type: Status

Status code.

Meta