![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cPingClient.h>
Public Member Functions | |
| cPingClientQuery () | |
| virtual | ~cPingClientQuery () |
| void | InitClientData () |
| bool | HasResponse () const |
| TIMESYSD_t | CheckTimeLagMax () |
| bool | CheckPingTime (TIMESYS_t timeNow, TIMESYSD_t nTimeThrottle=cTimeSys::k_FREQ *10) |
| void | OnRxEchoResp (TIMESYS_t timeSent) |
| virtual HRESULT | OnPingRx (HRESULT hRes, const BYTE *pPayload, size_t nPayloadLen) |
Public Attributes | |
| cNetAddress | m_AddrServer |
| address of the server we are pinging. More... | |
Track a clients attempts to ping a particular server. I'm expecting a response from this server. a client can track multiple servers. Can be used for TCP type pings as well.
| GrayLib::cPingClientQuery::cPingClientQuery | ( | ) |
|
inlinevirtual |
| bool GrayLib::cPingClientQuery::CheckPingTime | ( | TIMESYS_t | timeNow, |
| TIMESYSD_t | nTimeThrottle = cTimeSys::k_FREQ * 10 |
||
| ) |
Don't send pings too fast! nTimeThrottle my send.
| TIMESYSD_t GrayLib::cPingClientQuery::CheckTimeLagMax | ( | ) |
How long since a valid response.
| bool GrayLib::cPingClientQuery::HasResponse | ( | ) | const |
| void GrayLib::cPingClientQuery::InitClientData | ( | ) |
|
virtual |
Get My Ping byte packets back. (for this client to server connection)
| void GrayLib::cPingClientQuery::OnRxEchoResp | ( | TIMESYS_t | timeSent | ) |
i got a response back from the server MSGTYPE_ECHO_REQ. calculate the lag/delay
| cNetAddress GrayLib::cPingClientQuery::m_AddrServer |
address of the server we are pinging.