嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 10 元微信扫码支付:10 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
通过UPD协议监控客户机是否在线,以及是否运行指定进程
procedure TMainForm._ReHandSign(HandDataPackage:THandDataPackage);
var
_HandDataPackage:THandDataPackage;
PublicIp:string;
PublicPort:integer;
begin
_HandDataPackage:=HandDataPackage;
_HandDataPackage.Head.SendType:=Server;
_HandDataPackage.Head.ReceverType:=Client;
_HandDataPackage.Head.ComType:=ReHandSign;
_HandDataPackage.Head.DataLen:=SizeOf(_HandDataPackage);
PublicIp:=_HandDataPackage.Body.IP;
PublicPort:=_HandDataPackage.Body.Port;
Try
IdUDPS.SendBuffer(PublicIp,PublicPort,_HandDataPackage,sizeof(_HandDataPackage));
except
end;
end;
procedure TMainForm.IdUDPSUDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
var
Head:THead;
HandData:THandData;
HandDataPackage:THandDataPackage;
i:integer;
s:string;
begin
AData.ReadBuffer(Head, SizeOf(Head));
case (Head.ComType) of
//接收到客户端发出的握手请求
HandSign:begin
FillChar(HandData.MachineName, 15, 0);
AData.ReadBuffer(HandData, SizeOf(HandData));