]>
git.ipfire.org Git - thirdparty/squid.git/blob - tools/squidclient/Ping.h
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef _SQUID_TOOLS_CLIENT_PING_H
10 #define _SQUID_TOOLS_CLIENT_PING_H
13 * API for looping the squidclient request message
19 /// parameters controlling 'ping' mode message looping.
23 TheConfig() : enable(false), count(0), interval(1*1000) {}
25 /// display Ping Options command line help to stderr
29 * parse --ping command line options
30 * \return true if there are other options still to parse
32 bool parseCommandOpts(int argc
, char *argv
[], int c
, int &optIndex
);
39 extern TheConfig Config
;
41 /// initialize the squidclient ping mode
44 /// whether ping loop is completed at the given iteration.
45 inline bool LoopDone(int i
)
47 return !Ping::Config
.enable
|| (Ping::Config
.count
&& i
>= Ping::Config
.count
);
50 /// start timing a new transaction
53 /// calculate and display the statictics for a complete transaction
54 /// \param fsize number of bytes transferred during this transaction (for KB/s measure)
55 void TimerStop(size_t fsize
);
57 /// display summary of ping data collected
62 #endif /* _SQUID_TOOLS_CLIENT_PING_H */