home *** CD-ROM | disk | FTP | other *** search
- <H3>SYNOPSIS</H3>
- <BR>
- int ping(char *hostname);
- <BR>
- <BR>
- The dbping() function issues an ICMP ping request to the specified host
- and times the duration of the request.
- <BR>
- <H3>RETURN VALUES</H3>
- Returns the number of milliseconds it takes the host to respond.
- -1 is returned in the event the host does not respond.
- <P>
- <H3>EXAMPLES</H3>
- <BLOCKQUOTE><CODE><PRE>
- char *hostname = "www.microsoft.com";
-
- msec = ping(hostname);
- if (msec == -1)
- printf("Ping <I>%s<I> failed.", hostname);
- else
- printf("Ping <I>%s<I> responded in %d msec.", hostname, msec);
- </PRE></CODE></BLOCKQUOTE>
-