淡
淡如墨菊
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm2.DealData();
begin
form2.IdTCPServer1.Active:=false;
edit1.Text:='----服务器已经成功停止----';
IdTCPServer1.Active:=true;
edit1.Text:='----服务器已经成功停止----';
end;
procedure TForm2.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
with AThread.Connection do
begin
//更改
sCommand:=ReadLn();;
FLogEntry := sCommand + ' 来自于主机 '+ AThread.Connection.Socket.Binding.PeerIP;
//showmessage(scommand);
WriteLn('200: 数据接收成功!');
AThread.Synchronize(DealData);
end;
end;
从而引起了terminate thread timeout的错误,有什么解决方法?如果在dealdata中不停止服务器的连接,则会无缘故的连续两次执行dealdata。
begin
form2.IdTCPServer1.Active:=false;
edit1.Text:='----服务器已经成功停止----';
IdTCPServer1.Active:=true;
edit1.Text:='----服务器已经成功停止----';
end;
procedure TForm2.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
with AThread.Connection do
begin
//更改
sCommand:=ReadLn();;
FLogEntry := sCommand + ' 来自于主机 '+ AThread.Connection.Socket.Binding.PeerIP;
//showmessage(scommand);
WriteLn('200: 数据接收成功!');
AThread.Synchronize(DealData);
end;
end;
从而引起了terminate thread timeout的错误,有什么解决方法?如果在dealdata中不停止服务器的连接,则会无缘故的连续两次执行dealdata。