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

Method ProcessPureMessage

neo/framework/async/AsyncClient.cpp:1475–1503  ·  view source on GitHub ↗

================== idAsyncClient::ProcessPureMessage ================== */

Source from the content-addressed store, hash-verified

1473==================
1474*/
1475void idAsyncClient::ProcessPureMessage( const netadr_t from, const idBitMsg &msg ) {
1476 idBitMsg outMsg;
1477 byte msgBuf[ MAX_MESSAGE_SIZE ];
1478 int i;
1479 int inChecksums[ MAX_PURE_PAKS ];
1480
1481 if ( clientState != CS_CONNECTING ) {
1482 common->Printf( "clientState != CS_CONNECTING, pure msg ignored\n" );
1483 return;
1484 }
1485
1486 if ( !ValidatePureServerChecksums( from, msg ) ) {
1487 return;
1488 }
1489
1490 fileSystem->GetPureServerChecksums( inChecksums );
1491 outMsg.Init( msgBuf, sizeof( msgBuf ) );
1492 outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
1493 outMsg.WriteString( "pureClient" );
1494 outMsg.WriteInt( serverChallenge );
1495 outMsg.WriteShort( clientId );
1496 i = 0;
1497 while ( inChecksums[ i ] ) {
1498 outMsg.WriteInt( inChecksums[ i++ ] );
1499 }
1500 outMsg.WriteInt( 0 );
1501
1502 clientPort.SendPacket( from, outMsg.GetData(), outMsg.GetSize() );
1503}
1504
1505/*
1506==================

Callers

nothing calls this directly

Calls 9

PrintfMethod · 0.45
InitMethod · 0.45
WriteShortMethod · 0.45
WriteStringMethod · 0.45
WriteIntMethod · 0.45
SendPacketMethod · 0.45
GetDataMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected