Client Protocol
CLIENT_HELLO (1)
args(dc_hash: u32, version: &str)
This is the first message a client may send. The dc_hash
is a
32-bit hash value calculated from all fields/classes listed in
the client’s DC file. The version is an app/game-specific string
that developers should change whenever they release a new client
build. Both values are compared to the Client Agent’s DC file
hash and configured version string to ensure that the client is
fully up-to-date. If the client is not up-to-date, it will be
disconnected with a ClientEject
. If the client is up-to-date,
the gameserver will send a ClientHelloResp
to inform the
client that it may proceed with its normal logic flow.
Note
Excerpt taken from the Astron project, licensed under the BSD-3-Clause license.
Copyright © 2013 Sam “CFSworks” Edwards
Copyright © 2013 Kevin “Kestred” Stenerson
CLIENT_HELLO_RESP (2)
This is sent by the Client Agent to the client when the client’s
ClientHello
is accepted. This message contains no arguments.
Note
Excerpt taken from the Astron project, licensed under the BSD-3-Clause license.
Copyright © 2013 Sam “CFSworks” Edwards
Copyright © 2013 Kevin “Kestred” Stenerson
CLIENT_DISCONNECT (3)
Sent by the client when it’s closing the connection. This message contains no arguments.
CLIENT_EJECT (4)
args(error_code: u16, reason: &str)
This is sent by the Client Agent to the client when the client is
being disconnected. The error_code
and reason
arguments
provide some explanation as to why the client is being dropped
from the game.
Note
Excerpt taken from the Astron project, licensed under the BSD-3-Clause license.
Copyright © 2013 Sam “CFSworks” Edwards
Copyright © 2013 Kevin “Kestred” Stenerson
CLIENT_HEARTBEAT (5)
The client should send this message on a regular interval.
If the Client Agent does not receive a ClientHeartbeat
for a
certain (configurable) amount of time, it will assume that the
client has crashed and disconnect the client.
This message contains no arguments.
Note
Excerpt taken from the Astron project, licensed under the BSD-3-Clause license.
Copyright © 2013 Sam “CFSworks” Edwards
Copyright © 2013 Kevin “Kestred” Stenerson