首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

IdTcpClient怎么等待IdTcpServer开启

2012-05-11 
IdTcpClient如何等待IdTcpServer开启如何让IdTcpClient不停的Connect,直到IdTcpServer开启.目前的情况,即

IdTcpClient如何等待IdTcpServer开启
如何让IdTcpClient不停的Connect,直到IdTcpServer开启.目前的情况,即使把IdTcpClient.Connec放在循环中,只要IdTCPServer没有提前开启,这个Connect就只能执行一次.

[解决办法]
while true do begin
try
IdTcpClient1.Connect;
break;
except
end;

end;
[解决办法]
我放在线程中每隔5秒连一次

热点排行