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

Function cancelServerQuery

Engine/source/app/net/serverQuery.cpp:633–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

DefineConsoleFunctionFunction · 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