TsgcUDPCLientProperties › Port

Port Property

UDP port number of the destination peer or server.

Syntax

property Port: Integer read GetPort write _SetPort;

Default Value

Remarks

Specifies the default UDP port used when sending datagrams with the parameterless overloads of WriteData. Valid range is 1 to 65535. The component does not bind to a fixed local port by default; an ephemeral port is assigned by the OS when the first datagram is sent. When DTLS is enabled, Port is the port on which the remote peer is listening for DTLS traffic.

Example

oClient.Host := 'server.example.com';
oClient.Port := 5000;
oClient.WriteData('ping');

Back to Properties