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

Function cancelServerQuery

engine/source/network/serverQuery.cc:541–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539//-----------------------------------------------------------------------------
540
541void cancelServerQuery()
542{
543 // Cancel the current query, if there is anything left
544 // on the ping list, it's dropped.
545 if ( sgServerQueryActive )
546 {
547 Con::printf( "Server query canceled." );
548 ServerInfo* si;
549
550 // Clear the master server packet list:
551 gPacketStatusList.clear();
552
553 // Clear the ping list:
554 while ( gPingList.size() )
555 {
556 si = findServerInfo( &gPingList[0].address );
557 if ( si && !si->status.test( ServerInfo::Status_Responded ) )
558 si->status = ServerInfo::Status_TimedOut;
559
560 gPingList.erase( U32( 0 ) );
561 }
562
563 // Clear the query list:
564 while ( gQueryList.size() )
565 {
566 si = findServerInfo( &gQueryList[0].address );
567 if ( si && !si->status.test( ServerInfo::Status_Responded ) )
568 si->status = ServerInfo::Status_TimedOut;
569
570 gQueryList.erase( U32( 0 ) );
571 }
572
573 sgServerQueryActive = false;
574 gServerBrowserDirty = true;
575 }
576}
577
578//-----------------------------------------------------------------------------
579

Callers 2

stopServerQueryFunction · 0.85

Calls 6

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

Tested by

no test coverage detected