![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cPingServer.h>
Public Member Functions | |
cPingServer (const IPingProtocol *pForm) | |
virtual | ~cPingServer () |
virtual UINT32 | get_PingStatusCode () const |
void | put_PingStatusCode (UINT32 dwStatusCode) |
virtual cStringA | get_PingInfo () const |
void | put_PingInfo (cStringA s) |
virtual HRESULT | onTickPing (OUT BYTE *pPayload, OUT size_t &nPayloadLen, OUT cNetAddress &SockAddr) override |
HRESULT | onTickPingSimple () |
UNITTEST_FRIEND (cPingServer) | |
![]() | |
cPingCommon (const IPingProtocol *pForm) | |
virtual | ~cPingCommon () |
HRESULT | OpenPing (const cNetAddress &AddrListen, bool bICMP=false) |
void | ClosePing () |
Additional Inherited Members | |
![]() | |
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 const size_t | k_SIZE_MAX = 1400 |
max size for UDP PING_QTY type packets. include prefix, header and payload. More... | |
Listen for UDP incoming pings and respond. UDP pinging. Also used for firewall testing. Clients are non-persisted/connectionless. Maybe use cNetAddrTracker to track past clients.
GrayLib::cPingServer::cPingServer | ( | const IPingProtocol * | pForm | ) |
|
virtual |
|
inlinevirtual |
get a status string for use of MSGTYPE_INFO_REQ.
|
inlinevirtual |
get status code for use of MSGTYPE_STATUS_REQ
just return the stored code. (or override this)
|
overridevirtual |
Poll for an incoming Ping Packet and respond to it if possible.
Reimplemented from GrayLib::cPingCommon.
HRESULT GrayLib::cPingServer::onTickPingSimple | ( | ) |
Check for incoming pings. default (simple) UDP implementation. most basic response to a ping.
|
inline |
set info for use of MSGTYPE_INFO_REQ. Server must update this.
|
inline |
set status code for use of MSGTYPE_STATUS_REQ. Server must update this.
just return the stored code. (or override this)
GrayLib::cPingServer::UNITTEST_FRIEND | ( | cPingServer | ) |