TsgcTCPClient › 属性 › BoundPortMin
绑定出站连接到端口范围时,本地端口范围的下限。
property BoundPortMin: TIdPort read FBoundPortMin write FBoundPortMin;
0
当 BoundPortMin 和 BoundPortMax 均不为零时,客户端会依次尝试将源套接字绑定到 [BoundPortMin..BoundPortMax] 范围内的端口,直到找到空闲端口。将两者均设为 0 可让操作系统选择任意临时端口,或设置 BoundPort 以固定单个端口。
oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.BoundPortMin := 50000;
oTCP.BoundPortMax := 50100;
oTCP.Active := true;