Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cClientAddrObj Class Reference

#include <cClientAddrObj.h>

Inheritance diagram for GrayLib::cClientAddrObj:
GrayLib::cNetAddrTracker Gray::cThreadLockableRef Gray::cRefBase Gray::cThreadLockStub IUnknown Gray::cLockableBase

Public Member Functions

 cClientAddrObj (const cNetAddress &addr)
 
 ~cClientAddrObj ()
 
- Public Member Functions inherited from GrayLib::cNetAddrTracker
 cNetAddrTracker (const cNetAddress &addr)
 
virtual ~cNetAddrTracker ()
 
cString get_Name () const
 
HASHCODE_t get_HashCode () const noexcept
 
cStringA get_DescString () const
 
bool LookupHostName ()
 
HRESULT DisposeThis ()
 
bool IsNeverDecay () const
 When to delete this IP tracking record? More...
 
void BumpDecayTimeSec (TIMESECD_t iSeconds)
 
bool IsBlocked () const
 Is this IP blocked from connecting. More...
 
bool SetBlocked (TIMESECD_t iTimeDecaySeconds, const char *pszReason)
 
bool onTickAddr (int iRefCount)
 
int get_Pings () const
 Transient Activity tracking info. More...
 
bool IncPingBlock (bool bPreAccept=false)
 Some event has occurred. More...
 
bool IncBadPassword (const char *pszAttackedAccountName)
 
void put_Account (cRefBase *pAccount)
 
cRefBasePtr get_Account () const
 
- Public Member Functions inherited from Gray::cThreadLockableRef
 cThreadLockableRef (int iStaticRefCount=0) noexcept
 
virtual ~cThreadLockableRef ()
 
virtual void onThreadLockFail (TIMESYSD_t dwWaitMS)
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 
- Public Member Functions inherited from Gray::cThreadLockStub
THREADID_t get_ThreadLockOwner () const
 

Additional Inherited Members

- Public Attributes inherited from GrayLib::cNetAddrTracker
cNetAddress m_addr
 The remote address we are tracking. IP4 OR IP6. More...
 
cStringA m_sIPHost
 Look up this IP host name. reverse DNS lookup. (Maybe async lookup) More...
 
cStringA m_sDescription
 Description of why this IP is blocked. or why we track it. More...
 
bool m_bTrusted
 This is a trusted IP. (don't ever block it. e.g. localhost) More...
 
- Static Public Attributes inherited from GrayLib::cNetAddrTracker
static const TIMESECD_t k_PING_WINDOW_LEN = (5 * 60)
 
static const int k_PINGS_PER_WINDOW = 5 * 10
 
static const TIMESECD_t k_BLOCK_LEN = (60)
 
- Protected Member Functions inherited from Gray::cLockableBase
 cLockableBase () noexcept
 
 ~cLockableBase ()
 
LONG get_LockCount () const
 
bool isLocked () const
 
void IncLockCount ()
 
LONG DecLockCount ()
 
void Lock ()
 
LONG Unlock ()
 
- Protected Attributes inherited from GrayLib::cNetAddrTracker
cTimeInt m_timeCreated
 When was this record created? More...
 
cTimeInt m_timeDecay
 Time this record should be gone. (may be set to NEVER) More...
 
cTimeInt m_timeBlockTil
 Blocked until this time. More...
 
cTimeInt m_timeWindowStart
 My ping check window started at this time. More...
 
cTimeInt m_timeLastEvent
 Last time we last interacted with this IP. More...
 
int m_iPings
 How many pings have we seen since m_timeWindowStart. More...
 
int m_iBadPasswords
 How many bad passwords since m_timeWindowStart. More...
 
cRefBasePtr m_pAccount
 associate this IP address with an account. (allow auto log in based on IP?) More...
 

Detailed Description

Todo:
Expose a cNetAddrTracker that may be stored and accessed via the scripting system

Constructor & Destructor Documentation

◆ cClientAddrObj()

GrayLib::cClientAddrObj::cClientAddrObj ( const cNetAddress addr)

◆ ~cClientAddrObj()

GrayLib::cClientAddrObj::~cClientAddrObj ( )

The documentation for this class was generated from the following files: