MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / cancelServerQuery

Function cancelServerQuery

Engine/source/app/net/serverQuery.cpp:634–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632//-----------------------------------------------------------------------------
633
634void cancelServerQuery()
635{
636 // Cancel the current query, if there is anything left
637 // on the ping list, it's dropped.
638 if ( sgServerQueryActive )
639 {
640 Con::printf( "Server query canceled." );
641 ServerInfo* si;
642
643 // Clear the master server packet list:
644 gPacketStatusList.clear();
645
646 // Clear the ping list:
647 while ( gPingList.size() )
648 {
649 si = findServerInfo( &gPingList[0].address );
650 if ( si && !si->status.test( ServerInfo::Status_Responded ) )
651 si->status = ServerInfo::Status_TimedOut;
652
653 gPingList.erase( U32( 0 ) );
654 }
655
656 // Clear the query list:
657 while ( gQueryList.size() )
658 {
659 si = findServerInfo( &gQueryList[0].address );
660 if ( si && !si->status.test( ServerInfo::Status_Responded ) )
661 si->status = ServerInfo::Status_TimedOut;
662
663 gQueryList.erase( U32( 0 ) );
664 }
665
666 sgServerQueryActive = false;
667 gServerBrowserDirty = true;
668 }
669}
670
671DefineEngineFunction( cancelServerQuery, void, (), , "cancelServerQuery();" )
672{

Callers 2

DefineEngineFunctionFunction · 0.85
stopServerQueryFunction · 0.85

Calls 7

printfFunction · 0.85
findServerInfoFunction · 0.85
U32Enum · 0.50
clearMethod · 0.45
sizeMethod · 0.45
testMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected