Home > Back-end >  Idicmpclient components use PING after the error message
Idicmpclient components use PING after the error message

Time:09-24

Procedure TForm1. PingClick (Sender: TObject);
Var
I: Integer;
The begin
Form1. Ping. Enabled:=false;
IdIcmp. ReceiveTimeout:=200;
For I:=0 to Listbox1. Do the Count - 1
The begin
Application. ProcessMessages;
Sleep (100);
IdIcmp. Host:=Listbox1. Items [I];
Listbox1. ItemIndex:=I;
IdIcmp. Ping;
Idicmp. Free;
Form1. Ping. Enabled:=true;
//if the stop then Break;

end;
end;


Procedure TForm1. IdIcmpReply (ASender: TComponent;
Const AReplyStatus: TReplyStatus);
The begin
Case AReplyStatus. ReplyStatusType of
RsEcho: Listbox2. Items. The Add (IdIcmp. Host + 'success time-consuming (ms) : "+ inttostr (areplystatus. MsRoundTripTime));
RsError: Listbox2. Items. The Add (IdIcmp. Host + 'error');
RsTimeOut: Listbox2. Items. The Add (IdIcmp. Host + 'timeout');
RsErrorUnreachable: Listbox2. Items. The Add (IdIcmp. Host + 'address error);
The else
Listbox2. Items. The Add (IdIcmp. Host + 'other unknown error);
end;
Listbox2. ItemIndex:=Listbox2. Count - 1;
end;

Error messages


Listbox1. Items [I] there are more than 200 IP address
An error
how to deal with?

CodePudding user response:

Enhance the user permission to try

CodePudding user response:

10040 error ha ha, no solution, low version of the indy no this problem,
  • Related