TsgcTCPClient › 属性 › BoundPort
连接前客户端套接字绑定的本地 TCP 端口。
property BoundPort: TIdPort read FBoundPort write FBoundPort;
0
固定出站连接使用的临时源端口。值为 0 时让操作系统分配任意空闲端口。当防火墙或对端要求已知源端口时,请使用特定值。如果需要在一个范围内绑定而不是单个端口,请设置 BoundPortMin 和 BoundPortMax,并将 BoundPort 保留为 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;