]>
git.ipfire.org Git - thirdparty/squid.git/blob - tools/squidclient/Ping.h
1 #ifndef _SQUID_TOOLS_CLIENT_PING_H
2 #define _SQUID_TOOLS_CLIENT_PING_H
5 * API for looping the squidclient request message
11 /// parameters controlling 'ping' mode message looping.
15 TheConfig() : enable(false), count(0), interval(1*1000) {}
17 /// display Ping Options command line help to stderr
21 * parse --ping command line options
22 * \return true if there are other options still to parse
24 bool parseCommandOpts(int argc
, char *argv
[], int c
, int &optIndex
);
31 extern TheConfig Config
;
33 /// initialize the squidclient ping mode
36 /// whether ping loop is completed at the given iteration.
37 inline bool LoopDone(int i
)
39 return !Ping::Config
.enable
|| (Ping::Config
.count
&& i
>= Ping::Config
.count
);
42 /// start timing a new transaction
45 /// calculate and display the statictics for a complete transaction
46 /// \param fsize number of bytes transferred during this transaction (for KB/s measure)
47 void TimerStop(size_t fsize
);
49 /// display summary of ping data collected
54 #endif /* _SQUID_TOOLS_CLIENT_PING_H */