Skip to content

Cmd_UdpTimeSyncAck

GigaToni edited this page Jul 14, 2017 · 2 revisions

Server -> Client = Cmd_UdpTimeSyncAck (540)

This is the answer packet to Cmd_UdpTimeSync (540)

Raw packet data sent by server

Pseudo struct

typedef struct
{
    unsigned int GlobalTime;
    unsigned int SystemTick;
};

Pseudo C# Class

public class TimeSyncAnswerPacket
{
    public uint GlobalTime;
    public uint SystemTick = 0;

    public void Send(Client client)
    {
        var ack = new Packet(Packets.UdpTimeSyncAck);
        ack.Writer.Write(GlobalTime); // Relay?
        ack.Writer.Write(SystemTick); // System Tick.
        client.Send(ack);
    }
}
Clone this wiki locally