ACR_ServerCommunicator.ServerLatencyMeasurer.SendPingToServer C# (CSharp) Method

SendPingToServer() public static method

This method is called to request an IPC channel latency measurement to a target server.
public static SendPingToServer ( uint PCObjectId, int ServerId, ACR_ServerCommunicator Script ) : void
PCObjectId uint Supplies the PC object id of the /// requesting player.
ServerId int Supplies the server id to send the ping /// request to.
Script ACR_ServerCommunicator Supplies the script object.
return void
        public static void SendPingToServer(uint PCObjectId, int ServerId, ACR_ServerCommunicator Script)
        {
            //
            // Package and serialize the ping state for transmission to the
            // remote server.  The remote server will echo the ping back, and
            // HandleServerPingResponse will then be invoked via a reply
            // run script request for acr_ping_server_response.
            //

            PingState State = new PingState(PCObjectId, Environment.TickCount);

            Script.RunScriptOnServer(ServerId, "acr_server_ping_request", State.ToString());
        }