![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cPingLister.h>
Public Member Functions | |
cPingLister () | |
virtual | ~cPingLister () |
HRESULT | InitData (cStringA sData) |
HRESULT | PingSendLister (TIMESYSD_t nTimeThrottle=cTimeSys::k_FREQ *60 *60 *4) |
HRESULT | RequestLister (cStringA sPrefix, cStringA &sResponse) |
UNITTEST_FRIEND (cPingLister) | |
![]() | |
cPingClient (const IPingProtocol *pForm) | |
virtual | ~cPingClient () |
HRESULT | PingSendGeneric (const cNetAddress &AddrServer, const BYTE *pData, size_t iLen) |
HRESULT | PingSendEcho (cPingClientQuery &server, TIMESYSD_t nTimeThrottle=cTimeSys::k_FREQ *10) |
HRESULT | onTickPingSimple (cPingClientQuery &server) |
UNITTEST_FRIEND (cPingClient) | |
![]() | |
cPingCommon (const IPingProtocol *pForm) | |
virtual | ~cPingCommon () |
HRESULT | OpenPing (const cNetAddress &AddrListen, bool bICMP=false) |
void | ClosePing () |
virtual HRESULT | onTickPing (OUT BYTE *pPayload, OUT size_t &nPayloadLen, OUT cNetAddress &SockAddr) |
Public Attributes | |
cNetAddrName | m_AddrServer |
the hostname of the list server to be looked up via DNS. More... | |
cTimeSys | m_timeSent |
Oldest time i sent and haven't yet gotten a response. More... | |
cStringA | m_sData |
the payload data block for registration. (name="sdf",url="sdf",status=x,etc) More... | |
![]() | |
cNetSocket | m_Socket |
the UDP socket i listen and send on. More... | |
const IPingProtocol * | m_pForm |
What type of ping protocol are we ? Ping packet formatter. More... | |
Static Public Attributes | |
static const NET_PORT_t | k_PortDef = 2594 |
port defined as 'Snap discovery'? NOT 'silverplatter' More... | |
static const char * | k_pszAddrDef = "menasoft.asuscomm.com" |
![]() | |
static const size_t | k_SIZE_MAX = 1400 |
max size for UDP PING_QTY type packets. include prefix, header and payload. More... | |
periodically ping a lister service. tell it we are alive. throttle this to only once per X time period.
GrayLib::cPingLister::cPingLister | ( | ) |
Periodically register myself with the lister. calling PingSendLister()
|
virtual |
HRESULT GrayLib::cPingLister::PingSendLister | ( | TIMESYSD_t | nTimeThrottle = cTimeSys::k_FREQ * 60 * 60 * 4 | ) |
calls MakePingPacket for data packet for registration. expect no response from this. UDP
send a UDP MSGTYPE_INFO_RESP datagram and expect no response from this. or maybe get MSGTYPE_STATUS_RESP back if OK?
open a TCP request to lister server machine. this includes error checking and acknowledgment from the server.
GrayLib::cPingLister::UNITTEST_FRIEND | ( | cPingLister | ) |
|
static |
port defined as 'Snap discovery'? NOT 'silverplatter'
|
static |
cNetAddrName GrayLib::cPingLister::m_AddrServer |
the hostname of the list server to be looked up via DNS.
cStringA GrayLib::cPingLister::m_sData |
the payload data block for registration. (name="sdf",url="sdf",status=x,etc)
cTimeSys GrayLib::cPingLister::m_timeSent |
Oldest time i sent and haven't yet gotten a response.