怎么知道自己是不是丢包?? 例如ping 21cn.com还有怎么得到返回的 time 值是多少????如果丢包怎么返回变量??? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用TIdIcmpClientprocedure TForm1.IdIcmpClient1Reply(ASender: TComponent; const AReplyStatus: TReplyStatus);begin Memo1.Lines.Add(Self.IdIcmpClient1.Host); Memo1.Lines.Add(Format('FromIpAddress: %s, BytesReceived: %d, MsgType: %d, ' + 'MsRoundTripTime: %d, SequenceId: %d, TimeToLive: %d, ReplyStatusType: %d', [ AReplyStatus.FromIpAddress, AReplyStatus.BytesReceived, AReplyStatus.MsgType, AReplyStatus.MsRoundTripTime, AReplyStatus.SequenceId, AReplyStatus.TimeToLive, Integer(AReplyStatus.ReplyStatusType) ]));end; 那么 在哪里加入变量 21cn.com ???? procedure TForm1.BitBtn1Click(Sender: TObject);begin IdIcmpClient1.Host := 'www.google.com'; IdIcmpClient1.Ping;end;procedure TForm1.IdIcmpClient1Reply(ASender: TComponent; const AReplyStatus: TReplyStatus);begin Memo1.Lines.Add(Self.IdIcmpClient1.Host); Memo1.Lines.Add(Format('FromIpAddress: %s, BytesReceived: %d, MsgType: %d, ' + 'MsRoundTripTime: %d, SequenceId: %d, TimeToLive: %d, ReplyStatusType: %d', [ AReplyStatus.FromIpAddress, AReplyStatus.BytesReceived, AReplyStatus.MsgType, AReplyStatus.MsRoundTripTime, AReplyStatus.SequenceId, AReplyStatus.TimeToLive, Integer(AReplyStatus.ReplyStatusType) ]));end; 关于结构的问题。 菜鸟初学问题:连接远程数据库的方法 如何添加cursor? 关于数据类型定义的问题,请指教! 【IOCP完成端口求教】想学习完成端口技术,特来虚心学习 问个关于句柄的问题100分献上,可以要求加分 请问“没有注册类别”,是什么原因 LISTBOX问题 請 fisheep_cn(笨鱼) 來領分! 多謝。 关于存储过程的问题? Delphi学到什么程度才能找到工作? 请教关于ShellListView的问题,请帮忙!
const AReplyStatus: TReplyStatus);
begin
Memo1.Lines.Add(Self.IdIcmpClient1.Host);
Memo1.Lines.Add(Format('FromIpAddress: %s, BytesReceived: %d, MsgType: %d, '
+ 'MsRoundTripTime: %d, SequenceId: %d, TimeToLive: %d, ReplyStatusType: %d', [
AReplyStatus.FromIpAddress,
AReplyStatus.BytesReceived,
AReplyStatus.MsgType,
AReplyStatus.MsRoundTripTime,
AReplyStatus.SequenceId,
AReplyStatus.TimeToLive,
Integer(AReplyStatus.ReplyStatusType)
]));
end;
begin
IdIcmpClient1.Host := 'www.google.com';
IdIcmpClient1.Ping;end;procedure TForm1.IdIcmpClient1Reply(ASender: TComponent;
const AReplyStatus: TReplyStatus);
begin
Memo1.Lines.Add(Self.IdIcmpClient1.Host);
Memo1.Lines.Add(Format('FromIpAddress: %s, BytesReceived: %d, MsgType: %d, '
+ 'MsRoundTripTime: %d, SequenceId: %d, TimeToLive: %d, ReplyStatusType: %d', [
AReplyStatus.FromIpAddress,
AReplyStatus.BytesReceived,
AReplyStatus.MsgType,
AReplyStatus.MsRoundTripTime,
AReplyStatus.SequenceId,
AReplyStatus.TimeToLive,
Integer(AReplyStatus.ReplyStatusType)
]));
end;