TsgcTCPClient › Properties › BoundPortMin

BoundPortMin Property

Lower bound of the local port range when binding the outbound connection to a range of ports.

Syntax

property BoundPortMin: TIdPort read FBoundPortMin write FBoundPortMin;

Default Value

0

Remarks

When BoundPortMin and BoundPortMax are both non-zero, the client tries to bind the source socket sequentially to ports in the range [BoundPortMin..BoundPortMax] until a free port is found. Leave both at 0 to let the OS pick any ephemeral port, or set BoundPort to pin a single port.

Example


oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.BoundPortMin := 50000;
oTCP.BoundPortMax := 50100;
oTCP.Active := true;

Back to Properties