TsgcTCPClient › Properties › BoundPort
Local TCP port the client socket is bound to before connecting.
property BoundPort: TIdPort read FBoundPort write FBoundPort;
0
Fixes the ephemeral source port used by the outbound connection. A value of 0 lets the operating system allocate any free port. Use a specific value when a firewall or peer requires a known source port. If you need to bind within a range instead of a single port, set BoundPortMin and BoundPortMax and leave BoundPort at 0.
oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.BoundIP := '192.168.1.50';
oTCP.BoundPort := 54321;
oTCP.Active := true;