Error types that CRequestRateControl can generate.
Enumerator eNumRequestsMaxMaximum number of requests exceeded;.
eNumRequestsPerPeriodNumber of requests per period exceeded;.
eMinTimeBetweenRequestsThe time between two consecutive requests is too short;.
Definition at line 61 of file request_control.hpp.
◆ ESignal Enumerator eSignal_HUPHangup.
eSignal_INTInterrupt.
eSignal_QUITQuit.
eSignal_ILLIllegal instruction.
eSignal_FPEFloating-point exception.
eSignal_ABRTAbort.
eSignal_SEGVSegmentation violation.
eSignal_PIPEBroken pipe.
eSignal_TERMTermination.
eSignal_USR1User defined signal 1.
eSignal_USR2User defined signal 2.
eSignal_AnyAny/all signal(s) from the list above.
Definition at line 69 of file ncbi_signal.hpp.
◆ EStageNote that each stage has a previous one as a prerequisite, with the only exception for the stateful service (last check) that may work when forced into the stateless mode even if the firewall connections (in preceding check) have been found non-operational...
Enumerator eNoneZero placeholder.
eDnsCheck host names.
eHttpCheck whether HTTP works.
eDispatcherCheck whether NCBI dispatcher works.
eStatelessServiceCheck whether simplest NCBI service works.
eFirewallConnPointsObtain all FW ports for stateful services.
eFirewallConnectionsCheck all FW ports, falling back if needed.
eStatefulServiceCheck whether NCBI stateful service works.
Definition at line 57 of file ncbi_conn_test.hpp.
◆ EThrottleActionWhat to do if exceeded the rate limits.
Enumerator eSleepSleep till the rate requirements are met & return.
eErrCodeReturn immediately with err code == FALSE.
eExceptionThrow an exception.
eDefaultin c-tor – eSleep; in Approve() – value set in c-tor
Definition at line 93 of file request_control.hpp.
◆ EThrottleModeThrottle mode.
In case if number of requests and time period are specified, it is possible to select between two modes for request throttler. First mode is eContinuous. It use internal time line to check number of requests in the past period of time, using current time as ending point for that period. Starting point determinates with ordinary subtraction of "per_period" time, specified in object's constructor, from current time. So the controlled time frame moves continuously in time. Contrary to continuos mode, eDiscrete mode have fixed starting point for period of time, where throttler checks number of incoming requests. First time period starts when CRequestRateControl object creates. Each next period starts with interval of "per_period", or from first approved request in case of long period of inactivity. When each new period starts, the throttler drops all restrictions, and starts to count number of allowed requests per period from zero. Usually eDiscrete mode is a little bit faster and less memory consuming.
Enumerator eContinuousUses float time frame to check number of requests.
eDiscreteUses fixed time frame to check number of requests.
Definition at line 118 of file request_control.hpp.
◆ Add() ◆ AddExclusion() ◆ Approve() ◆ ApproveTime() CTimeSpan CRequestRateControl::ApproveTime ( void ) inlineGet a time span in which request can be approved.
You should call this method until it returns zero time span, otherwise you should sleep (using Sleep() method) for indicated time.
Definition at line 245 of file request_control.hpp.
References CRequestRateControl::eSleep, and CRequestRateControl::x_Approve().
◆ AutoMap()template<class Result , class Source , class ToKey >
Result& AutoMap ( unique_ptr< Result > & cache, const Source & source, const ToKey & toKey ) inlineRetrieve the result from the result cache - if cache is empty, insert into cache from the supplied source.
Definition at line 183 of file ncbiutil.hpp.
References i, and rapidjson::source.
◆ CBestChoiceTracker()template<typename T , typename F >
◆ CConnTest()Create test suite.
Definition at line 84 of file ncbi_conn_test.cpp.
References CConnTest::SetTimeout().
◆ CheckFWConnections()Definition at line 1016 of file ncbi_conn_test.cpp.
References _ASSERT, conn, CONN_FWD_URL, CONN_Read(), CONN_SetTimeout(), CONN_Wait(), ConnNetInfo_Create(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, CConnTest::eFirewallConnections, eFWMode_Adaptive, eFWMode_Fallback, eIO_Close, eIO_Interrupt, eIO_InvalidArg, eIO_NotSupported, eIO_Read, eIO_ReadPlain, eIO_Success, eIO_Timeout, eIO_Unknown, ctll::empty(), first(), fProxy_Http, fSOCK_LogDefault, AutoPtr< X, Del >::get(), CConn_IOStream::GetCONN(), CConn_IOStream::GetSocket(), CSocketAPI::HostPortToString(), if(), ITERATE, kCanceled, kEmptyStr, kFWSign, CConnTest::m_Canceled, CConnTest::m_CheckPoint, CConnTest::m_DebugPrintout, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_FwdFB, CConnTest::m_HttpProxy, CConnTest::m_Stateless, CConnTest::m_Timeout, n, NON_CONST_ITERATE, CConstRef< C, Locker >::NotNull(), CSocketAPI::ntoa(), poll, CSocketAPI::Poll(), CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_FIREWALL, REG_CONN_HTTP_PROXY_LEAK, REG_CONN_STATELESS, AutoPtr< X, Del >::reset(), SERV_AddFirewallPort(), SERV_InitFirewallPorts(), SERV_PrintFirewallPorts(), CConn_IOStream::SetCanceledCallback(), CConn_IOStream::SetTimeout(), st(), CConn_IOStream::Status(), CConnTest::CFWConnPoint::status, util::strcmp(), string, NStr::strncasecmp(), NStr::UIntToString(), and CConnTest::x_TimeoutMsg().
Referenced by CConnTest::Execute().
◆ ClearSignals() ◆ CMask() ◆ ConnStatus()Helper function that assures to return eIO_Success if the predicate "failure" is false; and other code otherwise: either taken from the underlying CONN object, or eIO_Unknown as a fallback.
Also, it sets the m_CheckPoint member to contain the connection description if available (retrievable with GetCheckPoint()).
Definition at line 158 of file ncbi_conn_test.cpp.
References eIO_Open, eIO_Read, eIO_Success, eIO_Unknown, eIO_Write, failure, CConn_IOStream::GetCONN(), CConn_IOStream::GetDescription(), CConn_IOStream::GetType(), kEmptyStr, CConnTest::m_CheckPoint, CConn_IOStream::Status(), and text().
Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_GetFirewallConfiguration().
◆ CRequestRateControl() ◆ DeleteElements() [1/3]template<class Cnt >
void DeleteElements ( Cnt & cnt ) inline ◆ DeleteElements() [2/3]template<class Key , class Element >
◆ DeleteElements() [3/3]template<class Key , class Element >
◆ DispatcherOkay()Definition at line 592 of file ncbi_conn_test.cpp.
References buf, ConnNetInfo_Create(), ConnNetInfo_SetupStandardArgs(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, CConnTest::eDispatcher, eIO_Interrupt, eIO_NotSupported, eIO_Success, eIO_Timeout, eURL_Https, NStr::FindNoCase(), AutoPtr< X, Del >::get(), HELP_EMAIL, kCanceled, kEmptyStr, kTestService, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_Timeout, NPOS, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_HOST, REG_CONN_PATH, REG_CONN_PORT, s_Adjust(), s_Cleanup(), s_SvcHeader(), CConn_IOStream::SetCanceledCallback(), str(), and CConnTest::x_TimeoutMsg().
Referenced by CConnTest::Execute().
◆ DnsOkay()User-redefinable checks for each stage.
Every check must include at least one call of PreCheck() followed by PostCheck() with parameter "step" set to 0 (meaning the "main" check); and as many as necessary optional substeps (nested or going back to back) enumerated with "step". A check returning eIO_Success means that its main check with all substeps have successfully passed. Otherwise, it is a failing check that can return an explanation via the "reason" pointer (if non-NULL) or at least clear the string.
Definition at line 383 of file ncbi_conn_test.cpp.
References ConnNetInfo_Create(), CConnTest::eDns, eIO_Success, eIO_Unknown, eOn, CSocketAPI::gethostbyname(), CConnTest::m_DebugPrintout, NCBI_WWW, CConnTest::PostCheck(), CConnTest::PreCheck(), result, and string.
Referenced by CConnTest::Execute().
◆ Execute()Execute the test suite from the very first (eHttp) up to and including the requested "stage".
It is expected that the call advances to the next check only if the previous one was successful (or conditionally successful, meaning even though it may have formally failed, it still returned eIO_Success and created favorable preconditions for the following check to likely succeed).
NOTE that "*reason" may contain non-empty string when the call completes successfully. Always check return code, instead of making any assumption on the contents of "*reason".
Definition at line 103 of file ncbi_conn_test.cpp.
References check, CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::DnsOkay(), CConnTest::eHttp, eIO_Interrupt, eIO_InvalidArg, eIO_Success, CConnTest::eNone, CConnTest::ExtraCheckOnFailure(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::m_CheckPoint, CConnTest::m_End, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_HttpProxy, CConnTest::m_Stateless, NULL, CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_CheckTrap().
Referenced by CConnTestThread::Main().
◆ ExtraCheckOnFailure() EIO_Status CConnTest::ExtraCheckOnFailure ( void ) protectedvirtualLast resort check.
Definition at line 281 of file ncbi_conn_test.cpp.
References _ASSERT, conn, CONN_Wait(), ConnNetInfo_Create(), eDebugPrintout_Data, eIO_Interrupt, eIO_Read, eIO_Success, eIO_Timeout, eIO_Unknown, CConnTest::eNone, ERASE_ITERATE, eReqMethod_Head, eURL_Http, eURL_Https, AutoPtr< X, Del >::get(), CDeadline::GetExpirationTime(), CDeadline::IsExpired(), kEmptyStr, kMicroSecondsPerSecond, kNanoSecondsPerSecond, kTimeout, CConnTest::m_Canceled, CConnTest::m_CheckPoint, CConnTest::m_Timeout, n, NCBI_WWW, NCBI_WWW_BEMD, CConnTest::PostCheck(), CConnTest::PreCheck(), AutoPtr< X, Del >::reset(), s_Adjust(), s_AnyHeader(), s_Cleanup(), STimeoutTag::sec, STimeoutTag::usec, and VECTOR_ERASE.
Referenced by CConnTest::Execute().
◆ FindBestChoice()template<typename C , typename F >
C::value_type FindBestChoice ( const C & container, F score_func ) inlineFind the best choice (lowest score) for values in a container.
Container and scoring functions are specified as template parameters.
Definition at line 250 of file ncbiutil.hpp.
Referenced by CFeatGapInfo::AdjustForRelevantGapIntervals(), CSourceModParser::ApplyAllMods(), BOOST_AUTO_TEST_CASE(), CAutoDefFakePromoterClause::CAutoDefFakePromoterClause(), CAutoDefPromoterAnd5UTRClause::CAutoDefPromoterAnd5UTRClause(), ChangeSeqId(), COligoSpecificityTemplate::COligoSpecificityTemplate(), Convert_Bioseq_Seq_id(), Convert_Seq_entry_Seq_id(), Convert_Seq_entry_Seq_loc(), Convert_SeqSubmit_Seq_id(), CBlastDBExtractor::ExtractAccession(), CBlastDBExtractor::ExtractFasta(), CBlastDBExtractor::ExtractLinksInteger(), CBlastDBExtractor::ExtractMembershipInteger(), CBlastDBExtractor::ExtractSeqId(), CGBSeqFormatter::FormatFeature(), CHTMLFormatterEx::FormatLocation(), CSeqFastaReader::GenerateID(), CAlnReader::GenerateID(), CTextAlnReader::GenerateID(), GetBestBioseqLabel(), CShowBlastDefline::GetBioseqHandleDeflineAndId(), CBioseq::GetLabel(), CAlignFormatUtil::GetLinkoutUrl(), CBioseq::GetLocalId(), CBioseq::GetNonLocalId(), CSequenceUpdater::GetRevCompReport(), CShowBlastDefline::GetSeqIdListString(), CAlignFormatUtil::GetSeqLinkoutInfo(), GetSequenceLengthAndId(), CSeq_id::GetStringDescr(), CVDBBlastUtil::GetVDBSeqIdFromOID(), CFastaReader::ParseDefLine(), CFastaReader::PostProcessIDs(), CSeqFastaReader::PostProcessIDs(), CGlimmerReader::Read(), CFastaIdsResolver::ResolveSeqId(), CSplignApp::Run(), s_AddOtherRelatedInfoLinks(), s_ConfigureDeflineTitle(), s_ConvertBioseqs2TSeqLocVector(), s_ConvertSubjects2TSeqLocVector(), s_DeflineCompare(), s_ExtractQueryIdsFromBioseqSet(), s_FindBestChoiceForDbsource(), s_FixBioseqDeltas(), s_GetBestIDForURL(), s_GetDeflineIdString(), s_GetFullLinkoutUrl(), s_GetIdLabel(), s_GetSeqIdListString(), s_LimitDeflines(), s_ModifySeqAlnWithFilteredSeqIDs(), s_SeqAlignToXMLHit(), s_SetCloneInfo(), s_UseFastaReaderDeflines(), SeqDB_SimplifyAccession(), CIgBlastTabularInfo::SetAirrFormatData(), CSearch< LEGACY, NHITS >::SetResult(), CAliToSeq_align::StringToSeq_id(), CBlastDB_FastaFormatter::Write(), CSeq_id::WriteAsFasta(), CId1FetchApp::WriteQualityScores(), CAsn2FlatApp::x_AddSNPAnnots(), CBlastFormat::x_CreateSubjectBioseq(), CDisplaySeqalign::x_DisplaySequenceIDForQueryAnchored(), CImportFeatTable::x_DoImportCDS(), CRemoteBlast::x_ExtractQueryIds(), CBlastFastaInputSource::x_FastaToSeqLoc(), CShowBlastDefline::x_FillDeflineAndId(), CDisplaySeqalign::x_FillSeqid(), CDBSourceItem::x_GatherInfo(), CAlnGraphic::x_GetAlnInfo(), CFastaOstream::x_GetBestId(), CDisplaySeqalign::x_GetDumpgnlLink(), CAutoDef::x_GetFeatureClauses(), x_GetId(), CVecscreenRun::CFormatter::x_GetIdsAndTitlesForSeqAlign(), CFeatModApply::x_GetWholeSeqLoc(), CDisplaySeqalign::x_InitAlignParams(), CBlastKmerResults::x_InitScoreVec(), CCompareWithBiosample::x_LoadData(), CDisplaySeqalign::x_PrepareDynamicFeatureInfo(), CDisplaySeqalign::x_PrintDefLine(), CSequenceUpdater::x_RemoveNewIDInFeature(), COligoSpecificityCheck::x_SavePrimerInfo(), CBlastDBExtractor::x_SetGi2AccMap(), and CBlastDBExtractor::x_SetGi2SeqIdMap().
◆ GetBestChoice()template<typename T , typename F >
◆ GetCheckPoint() ◆ GetErrCodeString() const char * CRequestRateControlException::GetErrCodeString ( void ) const overridevirtual ◆ GetFWConnections()Definition at line 806 of file ncbi_conn_test.cpp.
References _ASSERT, _TROUBLE, CONN_FWD_PORT_MAX, CONN_FWD_PORT_MIN, CONN_FWD_URL, CONN_PORT_HTTPS, CONN_PORT_SSH, ConnNetInfo_Create(), ConnNetInfo_OverrideUserHeader(), ConnNetInfo_SetupStandardArgs(), DEF_CONN_REG_SECTION, CConnTest::eFirewallConnPoints, eFWMode_Adaptive, eFWMode_Fallback, eFWMode_Firewall, eIO_Interrupt, eIO_Success, eIO_Timeout, eIO_Unknown, ctll::empty(), eReqMethod_Post, eURL_Https, fProxy_Http, AutoPtr< X, Del >::get(), HELP_EMAIL, CSocketAPI::HostPortToString(), ITERATE, kCanceled, CConnTest::m_DebugPrintout, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_FwdFB, CConnTest::m_HttpProxy, CConnTest::m_Stateless, CConnTest::m_Timeout, NCBI_AS_STRING, NCBI_FWD_BEMD, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_FIREWALL, SERV_PrintFirewallPorts(), util::strcmp(), NStr::UInt8ToString(), NStr::UIntToString(), CConnTest::x_GetFirewallConfiguration(), x_Large(), and CConnTest::x_TimeoutMsg().
Referenced by CConnTest::Execute().
◆ GetKey() ◆ GetMapElement()template<class Key , class Element >
◆ GetMapString() ◆ GetSignals() ◆ HttpOkay()Definition at line 426 of file ncbi_conn_test.cpp.
References _ASSERT, NStr::CompareNocase(), ConnNetInfo_Create(), ConnNetInfo_SetArgs(), ConnNetInfo_SetUserHeader(), CConnTest::ConnStatus(), DEF_CONN_HOST, DEF_CONN_REG_SECTION, CConnTest::eHttp, eIO_Interrupt, eIO_NotSupported, eIO_Success, eIO_Timeout, eIO_Unknown, eURL_Http, fHTTP_AdjustOnRedirect, fProxy_Http, fProxy_Https, AutoPtr< X, Del >::get(), kCanceled, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_HttpProxy, SAuxData::m_Redirect, CConnTest::m_Timeout, n, NCBI_WWW, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_HOST, REG_CONN_HTTP_PROXY_SKIP, REG_CONN_PASS, REG_CONN_PORT, REG_CONN_USER, s_Adjust(), s_Cleanup(), s_GoodHeader(), CConn_IOStream::SetCanceledCallback(), string, NStr::UIntToString(), and CConnTest::x_TimeoutMsg().
Referenced by CConnTest::Execute().
◆ InsertMapElement()template<class Key , class Element >
◆ is_sorted() [1/2]template<class Iterator >
◆ is_sorted() [2/2]template<class Iterator , class Predicate >
bool is_sorted ( Iterator iter1, Iterator iter2, Predicate pred ) ◆ IsEnabled() bool CRequestRateControl::IsEnabled ( void ) const inline ◆ IsNcbiInhouseClient() bool CConnTest::IsNcbiInhouseClient ( void ) static ◆ IsSignaled()Check that any of specified signals is received.
Referenced by SBlobInserter::operator()(), SBlobCopier::operator()(), CNgAligner::x_Align_Impl(), CPrimeCacheApplication::x_CacheSeqEntry(), CAsnSubCacheCreateApplication::x_FetchMissingBlobs(), CPrimeCacheApplication::x_Process_Fasta(), CInstancedAligner::x_RunAligner(), and CPrimeCacheApplication::x_SplitAndCacheSeqEntry().
◆ Lock() void CRequestRateControl::Lock ( void ) inline ◆ Match() [1/3] ◆ Match() [2/3]Match string.
Implements CMask.
Definition at line 37 of file mask_regexp.cpp.
References NStr::eNocase, CRegexp::fCompile_default, CRegexp::fCompile_ignore_case, CRegexp::IsMatch(), ITERATE, CMask::m_Exclusions, CMask::m_Inclusions, and str().
◆ Match() [3/3] ◆ NCBI_EXCEPTION_DEFAULT() ◆ NotNull()template<class X >
X* NotNull ( X * object ) inline ◆ operator()() [1/4] ◆ operator()() [2/4]template<typename T , typename F >
◆ operator()() [3/4] ◆ operator()() [4/4] ◆ operator<() ◆ PostCheck()PostCheck gets called upon successful ("status" contains eIO_Success) or unsuccessful (otherwise) completion of any step, with "reason" having an explanation in either case.
Successful completion expected to supply only a single line via the "reason" parameter; while a failing check can supply multiple lines (as an extended detailed explanation) separated with '
'. The default callback does the following: For a succeeding check it prints contents of "reason" and returns; For a failing check, it prints the word "FAILED" followed by textual representation of "status" and the return value of GetCheckPoint() if non-empty. It then prints each line of explanation (taken from "reason") as a numbered list of justified paragraphs. If there is only a single line results, it won't be enumerated. Each PostCheck() is expected to set the m_End member to "true", so that the nested or back-to-back substeps can be distiguished by the order of encounter of the m_End's values.
Definition at line 1509 of file ncbi_conn_test.cpp.
References buf, eIO_Success, NStr::EndsWith(), ERASE_ITERATE, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CConnTest::GetCheckPoint(), IO_StatusStr(), ITERATE, NStr::Justify(), kParIndent, CConnTest::m_End, CConnTest::m_Output, CConnTest::m_Width, n, NcbiEndl, NON_CONST_ITERATE, NStr::Split(), stmt, str(), string, and NStr::TruncateSpacesInPlace().
Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::DnsOkay(), CConnTest::ExtraCheckOnFailure(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_CheckTrap().
◆ PreCheck()User-defined rendering callbacks: PreCheck() and PostCheck().
Each callback receives a stage enumerator and a step within. At least one step (0) is required and denotes the main check. PreCheck gets called before the step starts, with the "title" containing either: a single-lined step title; or a multi-lined step description: the first line being the actual title, and remaining lines – a verbal explanation. Lines are separated with '
', and normally do not have any ending punctuation (but may be capitalized). The default callback does the following: For the single-lined titles, it outputs the title into the output stream (if provided in ctor), and then puts the ellipsis (...) without an ending newline; For the multi-lined description, the title is printed on the first line, and then each line of the description follows as a justified paragraph. Last paragraph ends with a new line. Each PreCheck() is expected to reset the m_End member to "false".
Definition at line 1470 of file ncbi_conn_test.cpp.
References NStr::EndsWith(), ERASE_ITERATE, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, ITERATE, NStr::Justify(), kEmptyStr, kParIndent, CConnTest::m_End, CConnTest::m_Output, CConnTest::m_Width, NcbiEndl, NcbiFlush, NON_CONST_ITERATE, ncbi::grid::netcache::search::fields::size, NStr::Split(), stmt, str(), and NStr::TruncateSpacesInPlace().
Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::DnsOkay(), CConnTest::ExtraCheckOnFailure(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_CheckTrap().
◆ Raise() ◆ Remove() ◆ RemoveExclusion() ◆ Reset() [1/2]Set new restriction for throttling mechanism.
Zero values for time spans 'per_period' or 'min_time_between_requests' means no rate restriction for that throttling mechanism, respectively.
Definition at line 59 of file request_control.cpp.
References CRequestRateControl::eDefault, CRequestRateControl::eSleep, CTimeSpan::GetAsDouble(), CRequestRateControl::m_LastApproved, CRequestRateControl::m_MinTimeBetweenRequests, CRequestRateControl::m_Mode, CRequestRateControl::m_NumRequests, CRequestRateControl::m_NumRequestsAllowed, CRequestRateControl::m_PerPeriod, CRequestRateControl::m_StopWatch, CRequestRateControl::m_ThrottleAction, CRequestRateControl::m_TimeLine, and CStopWatch::Restart().
Referenced by CRequestRateControl::CRequestRateControl().
◆ Reset() [2/2]Reset the list of handled signal.
Default signal handlers will be used for all handled signals (SIG_DFL).
Definition at line 649 of file ncbi_conn_test.cpp.
References NStr::Compare(), NStr::CompareNocase(), ConnNetInfo_Create(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, eIO_Interrupt, eIO_Success, eIO_Timeout, CConnTest::eStatelessService, free(), fSERV_Stateless, AutoPtr< X, Del >::get(), HELP_EMAIL, kBounceService, kCanceled, kTestService, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_Timeout, NcbiEndl, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_DISPD_DISABLE, REG_CONN_SERVICE_NAME, SERV_Close(), SERV_GetNextInfo(), SERV_MapperName(), SERV_OpenSimple(), SERV_ServiceName(), CConn_IOStream::SetCanceledCallback(), str(), NStr::ToUpper(), true, x_Large(), and CConnTest::x_TimeoutMsg().
Referenced by CConnTest::Execute().
◆ SetCanceledCallback() ◆ SetDebugPrintout() ◆ SetEmail() ◆ SetMapElement()template<class Key , class Element >
◆ SetMapString() ◆ SetOutput() ◆ SetTimeout() ◆ SetWidth() void CConnTest::SetWidth ( SIZE_TYPE width =72
) inline ◆ Sleep() void CRequestRateControl::Sleep ( CTimeSpan sleep_time ) static ◆ StatefulOkay()
Definition at line 1329 of file ncbi_conn_test.cpp.
References NStr::CompareNocase(), ConnNetInfo_Create(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, CTime::eCurrent, eFWMode_Fallback, eIO_Interrupt, eIO_Success, eIO_Timeout, CTime::eLocal, CConnTest::eStatefulService, NStr::fConvErr_NoThrow, fProxy_Http, free(), fSERV_Any, AutoPtr< X, Del >::get(), CTime::GetTimeT(), HELP_EMAIL, i, kCanceled, kEchoService, kFWSign, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_Fwd, CConnTest::m_HttpProxy, CConnTest::m_Stateless, CConnTest::m_Timeout, n, NStr::NumericToString(), CConnTest::PostCheck(), CConnTest::PreCheck(), CStreamUtils::Readsome(), REG_CONN_SERVICE_NAME, REG_CONN_STATELESS, rnd(), seed, SERV_Close(), SERV_GetNextInfo(), SERV_OpenSimple(), SERV_ServiceName(), CConn_IOStream::SetCanceledCallback(), CTime::SetTimeT(), ncbi::grid::netcache::search::fields::size, str(), NStr::strncasecmp(), NStr::ToUpper(), ud(), NStr::UIntToString(), x_Large(), and CConnTest::x_TimeoutMsg().
Referenced by CConnTest::Execute().
◆ TrapSignals() ◆ Unlock() ◆ x_Approve()Definition at line 85 of file request_control.cpp.
References _ASSERT, CRequestRateControl::eContinuous, CRequestRateControl::eDefault, CRequestRateControl::eDiscrete, CRequestRateControl::eErrCode, CRequestRateControl::eException, CStopWatch::Elapsed(), CRequestRateControl::eSleep, int, CRequestRateControl::kNoLimit, CRequestRateControl::m_LastApproved, CRequestRateControl::m_MinTimeBetweenRequests, CRequestRateControl::m_Mode, CRequestRateControl::m_NumRequests, CRequestRateControl::m_NumRequestsAllowed, CRequestRateControl::m_PerPeriod, CRequestRateControl::m_StopWatch, CRequestRateControl::m_ThrottleAction, CRequestRateControl::m_TimeLine, NCBI_THROW, CRequestRateControl::Sleep(), st(), and CRequestRateControl::x_CleanTimeLine().
Referenced by CRequestRateControl::Approve(), and CRequestRateControl::ApproveTime().
◆ x_CheckTrap() ◆ x_CleanTimeLine() void CRequestRateControl::x_CleanTimeLine ( TTime now ) private ◆ x_GetFirewallConfiguration()Obtain and populate FWD connection points from NCBI.
Definition at line 744 of file ncbi_conn_test.cpp.
References CConnTest::CFWConnPoint::addr, NStr::Compare(), NStr::CompareNocase(), CONN_FWD_PORT_MAX, CONN_FWD_PORT_MIN, ConnNetInfo_GetValueInternal(), CConnTest::ConnStatus(), eFWMode_Fallback, eFWMode_Firewall, eIO_InvalidArg, eIO_NotSupported, eIO_Success, SConnNetInfo::firewall, kEmptyStr, CConnTest::m_Canceled, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_FwdFB, CConnTest::m_Timeout, NcbiEndl, CConnTest::CFWConnPoint::port, s_Adjust(), s_Cleanup(), s_GoodHeader(), SERV_IsFirewallPort(), CConn_IOStream::SetCanceledCallback(), NStr::SplitInTwo(), CConnTest::CFWConnPoint::status, and CSocketAPI::StringToHostPort().
Referenced by CConnTest::GetFWConnections().
◆ x_TimeoutMsg() string CConnTest::x_TimeoutMsg ( void ) privateReturn verbal timeout suggestion.
Definition at line 143 of file ncbi_conn_test.cpp.
References kEmptyStr, CConnTest::m_Timeout, n, result, STimeoutTag::sec, and STimeoutTag::usec.
Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), and CConnTest::StatefulOkay().
◆ ~CConnTest() ◆ ~CMask() virtual CMask::~CMask ( void ) inlinevirtual ◆ addr ◆ kNoLimit ◆ m_Canceled ◆ m_CheckPoint string CConnTest::m_CheckPoint private ◆ m_DebugPrintout ◆ m_Email ◆ m_End ◆ m_Exclusions list<string> CMask::m_Exclusions protected ◆ m_Firewall bool CConnTest::m_Firewall protected ◆ m_Functemplate<typename T , typename F >
◆ m_Fwd ◆ m_FwdFB ◆ m_HttpProxy bool CConnTest::m_HttpProxy protected ◆ m_Inclusions list<string> CMask::m_Inclusions protected ◆ m_LastApproved TTime CRequestRateControl::m_LastApproved private ◆ m_MinTimeBetweenRequests TTime CRequestRateControl::m_MinTimeBetweenRequests private ◆ m_Mode ◆ m_NumRequests unsigned int CRequestRateControl::m_NumRequests private ◆ m_NumRequestsAllowed unsigned int CRequestRateControl::m_NumRequestsAllowed private ◆ m_Output ◆ m_PerPeriod TTime CRequestRateControl::m_PerPeriod private ◆ m_Scoretemplate<typename T , typename F >
◆ m_Stateless bool CConnTest::m_Stateless protected ◆ m_StopWatch ◆ m_ThrottleAction ◆ m_TimeLine ◆ m_Timeout ◆ m_Valuetemplate<typename T , typename F >
◆ m_Width ◆ port unsigned short CConnTest::CFWConnPoint::port ◆ status ◆ x_TimeoutRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4