procedure TServerClientThread.ReActivate(ASocket: TServerClientWinSocket);
begin
FClientSocket := ASocket;
if Assigned(FClientSocket) then
begin
FServerSocket := FClientSocket.ServerWinSocket;
FServerSocket.AddThread(Self);
{
FClientSocket.OnSocketEvent := HandleEvent;
FClientSocket.OnErrorEvent := HandleError;
}
FEvent.SetEvent;
end;
end;
在{}中代码偶认为是错误的,是无法触发服务器端事件的,改为下面的就行了
FServerSocket.OnSocketEvent := HandleEvent;
FServerSocket.OnErrorEvent := HandleError;
在试试看.....