MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / GetNETServers

Method GetNETServers

neo/framework/async/AsyncClient.cpp:384–408  ·  view source on GitHub ↗

================== idAsyncClient::GetNETServers ================== */

Source from the content-addressed store, hash-verified

382==================
383*/
384void idAsyncClient::GetNETServers( void ) {
385 idBitMsg msg;
386 byte msgBuf[MAX_MESSAGE_SIZE];
387
388 idAsyncNetwork::LANServer.SetBool( false );
389
390 // NetScan only clears GUI and results, not the stored list
391 serverList.Clear( );
392 serverList.NetScan( );
393 serverList.StartServers( true );
394
395 msg.Init( msgBuf, sizeof( msgBuf ) );
396 msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
397 msg.WriteString( "getServers" );
398 msg.WriteInt( ASYNC_PROTOCOL_VERSION );
399 msg.WriteString( cvarSystem->GetCVarString( "fs_game" ) );
400 msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_password" ), 2 );
401 msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_players" ), 2 );
402 msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_gameType" ), 2 );
403
404 netadr_t adr;
405 if ( idAsyncNetwork::GetMasterAddress( 0, adr ) ) {
406 clientPort.SendPacket( adr, msg.GetData(), msg.GetSize() );
407 }
408}
409
410/*
411==================

Callers

nothing calls this directly

Calls 14

NetScanMethod · 0.80
StartServersMethod · 0.80
GetCVarStringMethod · 0.80
GetCVarIntegerMethod · 0.80
SetBoolMethod · 0.45
ClearMethod · 0.45
InitMethod · 0.45
WriteShortMethod · 0.45
WriteStringMethod · 0.45
WriteIntMethod · 0.45
WriteBitsMethod · 0.45
SendPacketMethod · 0.45

Tested by

no test coverage detected