"Fossies" - the Fresh Open Source Software Archive

Member "libping-1.15/doc/pinghttp.3" (30 Oct 2002, 2562 Bytes) of package /linux/privat/old/libping-1.15.tar.gz:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even erroneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

PINGHTTP

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
CONFORMING TO
SEE ALSO

NAME

pinghttp, pingthttp − issue an HTTP/HTTPS GET request to a host.
tpinghttp, tpingthttp
− issue an HTTP/HTTPS GET request to a host and return the round trip time in milliseconds.

SYNOPSIS

#include <ping.h>

int pinghttp( char *host );

int pingthttp( char *host, int t );

int tpinghttp( char *host );

int tpingthttp( char *host, int t );

DESCRIPTION

The pinghttp() function issues a HTTP GET request to a host. It returns 1 if the host replies 200, 0 if the ping request times out and less than zero on an error. If a page is unavailable but the host is up, pinghttp will return -1 since the host did not return HTTP code 200 (see return values below.)

The pingthttp() function is similar, except it accepts a user specified timeout value. The default timeout value used by pingthttp() is 5 seconds. On slower, less reliable networks you may want to increase the timeout value. (pronounced: ping-tee-host)

The tpinghttp() function issues a HTTP GET request to a host. On success, the function returns the round trip time in milliseconds. (pronounced: tee-ping-http)

The tpingthttp() function is similar, except it accepts a user specified time out value. The default timeout value used by tpingthttp() is 5 seconds. On slower, less reliable networks you may want to increase the timeout value. (pronounced: tee-ping-tee-http)

RETURN VALUE

The pinghttp(), pingthttp(), tpinghttp() and tpingthttp() functions return an integer value.
>1 −− Round trip time in milliseconds.
1 −− Host is alive.
0 −− Connection timed out.
−1 −− Host or service is not reachable.
−2 −− Socket error.
−3 −− Connection refused.

CONFORMING TO

SVID 3, POSIX, BSD 4.3, ISO 9899

SEE ALSO

ding(1), pinghost(3), echohost(3), pingpop3(3), pingsmtp(3)