Skip to content

Control Messages

Similar to DML protocols, there is a category for control messages which Imlight identifies with a protocol id of 0.

These messages are used to establish a proper session between the game client and a server through a handshake process.

Session Offer

OpCode: 0

NameTypeDescription
SessionIdUSHRTThe session ID allocated by the server
Timestamp UpperINTThe upper 4 bytes of a timestamp.
Timestamp LowerINTThe lower 4 bytes of a timestamp.
MillisecondsUINTThe number of milliseconds into the current second.

Figure A.I -- The SessionOffer message structure.

WARNING

There are additional fields in this message that are not understood by us yet. They relate to the packet encryption introduced in 2021. However in the absence of these fields, a game/client session can still be initiated without encryption.

Keep Alive

OpCode: 3

NameTypeDescription
SessionIdUSHRTThe agreed upon session ID.
MillisecondsUINTThe number of milliseconds into the current second.
ElapsedSessionTimeUSHRTThe amount of time elapsed on the current session

Figure A.II -- The KeepAlive message structure.

Keep Alive (Server)

OpCode: 3

NameTypeDescription
SessionIdUSHRTThe agreed upon session ID.
MillisecondsUINTThe number of milliseconds into the current second.

Figure A.III -- The KeepAlive (server) message structure.

This packet is sent from the server to the client, and will always have a SessionId field of 0.

Keep Alive Response

OpCode: 4

NameTypeDescription
SessionIdUSHRTThe agreed upon session ID.
MillisecondsUINTThe number of milliseconds into the current second.
ElapsedSessionTimeUSHRTThe amount of time elapsed on the current session

Figure A.I -- The KeepAliveResponse message structure.

Session Accept

OpCode: 5

NameTypeDescription
ReservedUSHRT...
Timestamp UpperINTThe upper 4 bytes of a timestamp.
Timestamp LowerINTThe lower 4 bytes of a timestamp.
MillisecondsUINTThe number of milliseconds into the current second.
SessionIdUSHRTThe agreed upon session ID.

Figure A.IV -- The SessionAccept message structure.

WARNING

There are additional fields in this message that are not understood by us yet. They relate to the packet encryption introduced in 2021. However in the absence of these fields, a game/client session can still be initiated without encryption.