60 _timeLastMessageSent(0),
87 if (_config.fTimeoutIsInstant)
89 _config.timeoutSeconds = 0;
91 else if (_config.timeoutSeconds == 0)
93 _config.timeoutSeconds = 3;
97 if (_config.uMaxAttempts <= 0)
99 _config.uMaxAttempts = 2;
111 if (_config.fFilteringTest)
121 if (_config.fBehaviorTest)
144 bool fReadyToReturn =
false;
154 while (fReadyToReturn==
false)
202 hr = pCurrentTest->
GetMessage(spMsg, pAddrDest);
212 fReadyToReturn =
true;
233 hr = pCurrentTest->ProcessResponse(spMsg, addrRemote, addrLocal);
const uint32_t MAX_STUN_MESSAGE_SIZE
bool fBehaviorTestSuccess
HRESULT Initialize(StunClientLogicConfig &config)
#define E_STUNCLIENT_STILL_WAITING
CBehaviorTest _testBehavior2
#define E_STUNCLIENT_RESULTS_READY
CFilteringTest _testFiltering2
HRESULT GetNextMessage(CRefCountedBuffer &spMsg, CSocketAddress *pAddrDest, uint32_t timeCurrentMilliseconds)
bool fFilteringTestSuccess
virtual void NotifyTimeout()=0
#define ChkIf(expr, hrerror)
virtual bool IsCompleted()=0
CSocketAddress addrMapped
CFilteringTest _testFiltering3
virtual bool IsReadyToRun()=0
virtual HRESULT Init(StunClientLogicConfig *pConfig, StunClientResults *pResults)
std::vector< IStunClientTest * > _testlist
virtual HRESULT GetMessage(CRefCountedBuffer &spMsg, CSocketAddress *pAddrDest)=0
HRESULT ProcessResponse(CRefCountedBuffer &spMsg, CSocketAddress &addrRemote, CSocketAddress &addrLocal)
HRESULT GetResults(StunClientResults *pResults)
CSocketAddress addrMappingAA
void RunAsTest3(bool fSetAsTest3)
void RunAsTest3(bool fSetAsTest3)
boost::shared_ptr< CBuffer > CRefCountedBuffer
StunClientLogicConfig _config
StunClientResults _results
uint32_t _timeLastMessageSent
bool IsIPAddressZero() const
CSocketAddress addrMappingAP
#define ChkIfA(expr, hrerror)
CSocketAddress addrServer
virtual void PreRunCheck()=0
CBehaviorTest _testBehavior3