Skip to content

Protocol documentation.

tankwars92 edited this page Apr 3, 2026 · 5 revisions

Basics.

DMconnect protocol uses TCP (RFC 973) as the transport layer. The connection is persistent, once established, the client and server can exchange data continuously without reconnecting.

All data in the protocol is encoded in UTF-8. This allows for the transmission of text in any language and ensures compatibility between different systems.

The maximum permissible size of data transmitted per packet is 32,768 bytes.

Data exchange principle.

Each technical packet (command message) always begins with the character / (byte 2F).

The keep-alive packet is a single-byte 2F packet. After each keep-alive, the server responds with a *Ping* packet (2A 50 69 6E 67 2A in byte form).

It is recommended to send a keep-alive packet every 5 seconds.

Welcome message from the server and the authorization/registration process.

Welcome message.

For each new connection, the server immediately sends a packet:

Enter command (/login /register):

For any messages from the client that do not begin with: /login, /register, /, the server will resend the welcome message.

/login.

The /login package has the following structure:

/login NAME PASSWORD

1. If this structure is not respected, the server will respond with the following packet:

Usage: /login <username> <password>

And then it will send the greeting message again. So, the data exchange in this case looks like this:

Enter command (/login /register):
> /login                              <---- user message.
Usage: /login <username> <password>
Enter command (/login /register):

2. If you entered an incorrect username or password (or the user you want to log in as is simply not registered on this server), you will receive the following response:

Invalid username or password.

And then it will send the greeting message again. So, the data exchange in this case looks like this:

Enter command (/login /register):
> /login WRONG_USER WRONG_PASS        <---- user message.
Invalid username or password.
Enter command (/login /register):

3. If you have entered the correct username and password, the following will happen:

Login successful.                     <---- line break.
Available servers: general            <---- line break.
Select a server using /join_server <server_name>.

/register.

The /register package has the following structure:

/register NAME PASSWORD

1. If this structure is not respected, the server will respond with the following packet:

Usage: /register <username> <password>

And then it will send the greeting message again. So, the data exchange in this case looks like this:

Enter command (/login /register):
> /register                              <---- user message.
Usage: /reigster <username> <password>
Enter command (/login /register):

2. If the username you are trying to register is already taken, the server will send this packet:

Username already taken. Try another.

And then it will send the greeting message again. So, the data exchange in this case looks like this:

Enter command (/login /register):
> /register TAKEN_USERNAME PASSWORD     <---- user message.
Usage: /reigster <username> <password>
Enter command (/login /register):

3. If the account was successfully registered, the following will happen:

Registration successful. Please log in.
Enter command (/login /register):

Exchange of private messages.

Sending.

To send a private message to a user within your server, you must follow the following structure:

/pm USER MESSAGE

If you want to send a private message to a user on another server, you must follow this structure:

/pm USER@SERVER MESSAGE

Clone this wiki locally