Dev's NoxDev's Nox
Relay Protocol

Disconnect

Clean disconnection of the client with resource cleanup.

The Disconnect message allows a clean disconnection of the client.

It notifies the server of the intent to close the connection and allows appropriate resource cleanup.

Priority

Critical - This message has the highest priority to guarantee fast resource cleanup.

The Latency message requires that the client has completed the Handshake. Requests sent before the handshake will be ignored by the server.


Client Request → Server

Payload Format

[reason?: string]

Detailed Structure

TypeNameDescription
stringReasonReason for the disconnection (optional)

Payload Example

[0x0B, "User logout"]    // Reason = "User logout" (11 chars)

Disconnect without reason

// Empty payload - minimal disconnection

This case must be supported, but is discouraged.


Server Response → Client

Behavior

There are two possibilities depending on the context:

  • The client sent a voluntary Disconnect, so the server sends a Disconnect back to confirm the disconnection.
  • The server initiated the disconnection (e.g. protocol incompatibility after Handshake, or timeout) and sends a Disconnect to the client.

Payload Format

[reason?: string]

Detailed Structure

TypeNameDescription
stringReasonReason for the disconnection (optional)

Payload Example

[0x0F, "Goodbye"]    // Reason = "Goodbye" (7 chars)

On this page