<commit_before>Astron Client Protocol Documentation
---------------------------------------
**Author**
Sam "CFSworks" Edwards (09-17-2013)
Kevin "Kestred" Stenerson (10-08-2013)


### Section 0: Abstract ###

This file documents the protocol used by clients to communicate with an Astron
cluster. This should not be confused with the *internal protocol*, which is used
by Astron servers to communicate amongst themselves. Instead, the client
protocol is used by game clients (running on the players' computers) to communicate
with the Client Agent -- the gateway into the cluster. Because clients connect
to the Client Agent rather than directly into the Message Director, I will use
the terms "gameserver" and "Client Agent" interchangeably.

### Section 1: Basic messaging format ###

Unlike the internal protocol, the client protocol has a very simple messaging format.

    uint16 length;  // Length of theto entire message, excluding the length tag
    uint16 msgtype; // 16-bit identifier indicating what type of message is being sent
    ...             // message-specific data

Like the internal protocol, all multibyte integers are sent little-endian.

### Section 2: Typical client session ###

The client communicates with the server over a standard TCP connection. When the
client first connects, it is expected to send a `CLIENT_HELLO` message. This
message includes the hash of the DC file(s) and a (game-specific) version string.<commit_msg>Add new line between author names.<commit_after>Astron Client Protocol Documentation
---------------------------------------
**Author**
Sam "CFSworks" Edwards (09-17-2013)  
Kevin "Kestred" Stenerson (10-08-2013)


### Section 0: Abstract ###

This file documents the protocol used by clients to communicate with an Astron
cluster. This should not be confused with the *internal protocol*, which is used
by Astron servers to communicate amongst themselves. Instead, the client
protocol is used by game clients (running on the players' computers) to communicate
with the Client Agent -- the gateway into the cluster. Because clients connect
to the Client Agent rather than directly into the Message Director, I will use
the terms "gameserver" and "Client Agent" interchangeably.

### Section 1: Basic messaging format ###

Unlike the internal protocol, the client protocol has a very simple messaging format.

    uint16 length;  // Length of theto entire message, excluding the length tag
    uint16 msgtype; // 16-bit identifier indicating what type of message is being sent
    ...             // message-specific data

Like the internal protocol, all multibyte integers are sent little-endian.

### Section 2: Typical client session ###

The client communicates with the server over a standard TCP connection. When the
client first connects, it is expected to send a `CLIENT_HELLO` message. This
message includes the hash of the DC file(s) and a (game-specific) version string.
{'fraction_non_alphanumeric': 0.08682328907048008, 'fraction_numerical': 0.017024174327545116, 'mean_word_length': 3.7310789049919486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '87082', 'n_tokens_mistral': 740, 'n_tokens_neox': 685, 'n_words': 392}