博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PING
阅读量:7243 次
发布时间:2019-06-29

本文共 1450 字,大约阅读时间需要 4 分钟。

PING
Windows supports an Internet Control Message Protocol (ICMP) to determine whether or not a particular host is available.
ICMP is a network layer protocol that delivers flow control, error messages, routing, and other data between Internet hosts. ICMP is primarily used by application developers for a network ping.

A ping is the process of sending an echo message to an IP address and reading the reply to verify a connection between TCP/IP hosts. If you are writing new application you will be better to use the Winsock 2 raw sockets support, implemented in , for example.

Please note, however, that for Windows NT and Windows 2000 implementations, Raw Sockets are subject to security checks and are accessible only to members of the administrator's group. Icmp.dll provides functionality that allows developers to write Internet ping applications on Windows systems without Winsock 2 support.

Note that the Winsock 1.1 WSAStartup function must be called prior to using the functions exposed by ICMP.DLL. If you do not do this, the first call to IcmpSendEcho will fail with error 10091 (WSASYSNOTREADY).

Below you can find the Ping unit's source code. Here are two example's of usage.

1) Example 1 (code snippet):

uses Ping;...const ADP_IP = '208.185.127.40'; begin If  Ping.Ping(ADP_IP) then    ShowMessage('About Delphi Programming reachable!');end;
 

2) Here's another, Delphi program, that uses the Ping unit .. .

And, the Ping unit's source:

转载地址:http://qmybm.baihongyu.com/

你可能感兴趣的文章
django一对多 增 删 改 查
查看>>
Sqoop Export原理和详细流程讲解
查看>>
如何实现超高并发的无锁缓存?
查看>>
浅谈对java中锁的理解
查看>>
ASP.NET Core MVC之ViewComponents(视图组件)知多少?
查看>>
在天河二号上对比Julia,Python和R语言
查看>>
Docker容器学习梳理--私有仓库Registry使用
查看>>
arcgis地图服务之 identify 服务
查看>>
取汉子拼音首字母的C#方法
查看>>
C语言 · 求先序遍历
查看>>
java oracle thin 和 oci 连接方式实现多数据库的故障切换
查看>>
使用spring利用HandlerExceptionResolver实现全局异常捕获
查看>>
字符串 上
查看>>
jmeter设置全局变量
查看>>
MySQLi基于面向对象的编程
查看>>
CAAnimation 动画支撑系统
查看>>
读vue-0.6-text-parser.js源码
查看>>
对map进行排序
查看>>
IntelliJ IDEA 13.1.3 SVN无法正常使用问题
查看>>
Element link doesn't have required attribute property
查看>>