TsgcTCPClient › 属性 › BoundPortMin

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;

返回属性