From fb758c8f367a1fb4366f3a5d4ba140d828b93158 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Thu, 12 Feb 2026 16:24:08 -0500 Subject: [PATCH] Add protocol negotiation doc --- docs/how/protocols.rst | 169 +++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 170 insertions(+) create mode 100644 docs/how/protocols.rst diff --git a/docs/how/protocols.rst b/docs/how/protocols.rst new file mode 100644 index 0000000..d320bd4 --- /dev/null +++ b/docs/how/protocols.rst @@ -0,0 +1,169 @@ +protocol negotiation — GMCP, MSDP, and client detection +======================================================== + +how the server offers GMCP and MSDP to connecting clients, how clients +accept or reject them, and how the game guards against sending data to +clients that don't support it. + +see also: ``mud.tin`` (tintin++ client config), ``docs/lessons/charset-vs-mtts.txt`` +(related telnet negotiation gotcha). + + +the lifecycle +------------- + +1. client connects via telnet +2. telnetlib3 calls ``begin_negotiation()`` on our ``MudTelnetServer`` +3. server sends ``IAC WILL GMCP`` and ``IAC WILL MSDP`` +4. client replies ``IAC DO