1,541
edits
DrinkyBird (talk | contribs) (Created page with "Server admins often need to manage their servers, but launching Zandronum is slow and inconvenient. The ''RCON protocol'' allows us to make tools that connect to servers quick...") |
DrinkyBird (talk | contribs) (Re-uploaded huffman.zip) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
All Zandronum servers use '''UDP''' as their network protocol. | All Zandronum servers use '''UDP''' as their network protocol. | ||
Additionally, all traffic is compressed using the Huffman algorithm to save bandwidth. Therefore, you'll need [ | Additionally, all traffic is compressed using the Huffman algorithm to save bandwidth. Therefore, you'll need [https://wiki.zandronum.com/files/huffman.zip a copy of huffman.cpp or huffman.java] to encode and decode your traffic appropriately. | ||
Definition of data types used in this article: | Definition of data types used in this article: | ||
Line 20: | Line 20: | ||
Messages that the server sends to the client always begin with one of the following bytes: | Messages that the server sends to the client always begin with one of the following bytes: | ||
< | <syntaxhighlight lang="cpp" > | ||
enum | enum | ||
{ | { | ||
SVRC_OLDPROTOCOL = 32, //This set of enumerations starts at 32, increments by one | |||
SVRC_BANNED, | |||
SVRC_SALT, | |||
SVRC_LOGGEDIN, | |||
SVRC_INVALIDPASSWORD, | |||
SVRC_MESSAGE, | |||
SVRC_UPDATE, | |||
SVRC_TABCOMPLETE, | |||
SVRC_TOOMANYTABCOMPLETES, | |||
}; | }; | ||
</ | </syntaxhighlight> | ||
Messages that the client sends to the server always begin with one of the following bytes: | Messages that the client sends to the server always begin with one of the following bytes: | ||
< | <syntaxhighlight lang="cpp" > | ||
enum | enum | ||
{ | { | ||
CLRC_BEGINCONNECTION = 52, // Also increments by one | |||
CLRC_PASSWORD, | |||
CLRC_COMMAND, | |||
CLRC_PONG, | |||
CLRC_DISCONNECT, | |||
CLRC_TABCOMPLETE, | |||
}; | }; | ||
</ | </syntaxhighlight> | ||
Also, when the server sends SVRC_UPDATE, it's immediately followed by another byte: | Also, when the server sends SVRC_UPDATE, it's immediately followed by another byte: | ||
< | <syntaxhighlight lang="cpp" > | ||
enum | enum | ||
{ | { | ||
SVRCU_PLAYERDATA = 0, | |||
SVRCU_ADMINCOUNT, | |||
SVRCU_MAP, | |||
}; | }; | ||
</ | </syntaxhighlight> | ||
== Connecting to a server == | == Connecting to a server == |