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

Method SendPingResponseToServer

neo/framework/async/AsyncClient.cpp:645–664  ·  view source on GitHub ↗

================== idAsyncClient::SendPingResponseToServer ================== */

Source from the content-addressed store, hash-verified

643==================
644*/
645void idAsyncClient::SendPingResponseToServer( int time ) {
646 idBitMsg msg;
647 byte msgBuf[MAX_MESSAGE_SIZE];
648
649 if ( idAsyncNetwork::verbose.GetInteger() == 2 ) {
650 common->Printf( "sending ping response to server, gameInitId = %d\n", gameInitId );
651 }
652
653 msg.Init( msgBuf, sizeof( msgBuf ) );
654 msg.WriteInt( serverMessageSequence );
655 msg.WriteInt( gameInitId );
656 msg.WriteInt( snapshotSequence );
657 msg.WriteByte( CLIENT_UNRELIABLE_MESSAGE_PINGRESPONSE );
658 msg.WriteInt( time );
659
660 channel.SendMessage( clientPort, clientTime, msg );
661 while( channel.UnsentFragmentsLeft() ) {
662 channel.SendNextFragment( clientPort, clientTime );
663 }
664}
665
666/*
667==================

Callers

nothing calls this directly

Calls 8

GetIntegerMethod · 0.80
UnsentFragmentsLeftMethod · 0.80
SendNextFragmentMethod · 0.80
PrintfMethod · 0.45
InitMethod · 0.45
WriteIntMethod · 0.45
WriteByteMethod · 0.45
SendMessageMethod · 0.45

Tested by

no test coverage detected