Skip to content

docs/JAMULUS_PROTOCOL.md: message reference, directory flows, small fixes - #3794

Open
mcfnord wants to merge 2 commits into
jamulussoftware:mainfrom
mcfnord:enhance-protocol-doc
Open

docs/JAMULUS_PROTOCOL.md: message reference, directory flows, small fixes#3794
mcfnord wants to merge 2 commits into
jamulussoftware:mainfrom
mcfnord:enhance-protocol-doc

Conversation

@mcfnord

@mcfnord mcfnord commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

One file. Fills the main gaps in the protocol doc, verified against src/protocol.cpp / src/socket.cpp / src/serverlist.cpp on current main:

  • How a receiver tells protocol packets from audio packets (they share one port; parse-or-audio in CSocket::ProcessPacket()), the CRC parameters, and how acknowledge/retransmit actually works — previously the doc said only "must be acknowledged".
  • A complete message-ID reference table for both message classes, with the legacy IDs called out. This is the piece a Wireshark user or protocol reader currently has to reconstruct from protocol.h.
  • A new section on directories: registration and refresh/timeout intervals, server-list responses (why both reduced and full lists are sent), and the CLM_SEND_EMPTY_MESSAGE/CLM_EMPTY_MESSAGE NAT hole-punch flow — previously undocumented here despite being a third of the connectionless messages.
  • Fixes message names that drifted from protocol.h (REQ_CHANNEL_INFOS, CHANNEL_INFOS, REQ_CONN_CLIENTS_LIST).

CHANGELOG: SKIP

🤖 Generated with Claude Code

@ann0see
ann0see self-requested a review July 17, 2026 22:08
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
@ann0see ann0see added the AI AI generated or potentially AI generated label Jul 21, 2026
Comment thread docs/JAMULUS_PROTOCOL.md
Comment thread docs/JAMULUS_PROTOCOL.md
@ann0see
ann0see requested a review from softins July 23, 2026 09:17

@softins softins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Just a few comments and suggested changes.

Comment thread docs/JAMULUS_PROTOCOL.md
Comment thread docs/JAMULUS_PROTOCOL.md
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
@ann0see

ann0see commented Jul 26, 2026

Copy link
Copy Markdown
Member

Please squash the commits here.

…ixes

- Explain how receivers classify datagrams (protocol frame vs audio)
  and specify the CRC and the acknowledge/retransmit mechanism
- Add a complete message-ID reference for connection-based and
  connectionless messages
- Add a section on directory registration, server lists and NAT hole
  punching (registration refresh/timeout intervals, CLM message flows)
- Fix message names to match protocol.h (REQ_CHANNEL_INFOS,
  CHANNEL_INFOS, REQ_CONN_CLIENTS_LIST)
- Apply style guide capitalisation (Client, Server, Directory, Channel,
  Jitter Buffer) per https://jamulus.io/contribute/Style-and-Tone
- Move SPECIAL_SPLIT_MESSAGE (2001) out of the connection-based table
  into its own paragraph explaining it's a transport container, not a
  message type
- Document the raw (uncompressed PCM) audio option alongside
  OPUS/OPUS64: how it's advertised (FS_RAW_AUDIO in
  CLM_SERVER_FEATURES), disabled (--noraw), and how the Server tells
  it apart from OPUS (packet-size comparison, no distinct message type)

Co-Authored-By: Peter L Jones <pljones@users.noreply.github.com>
Co-Authored-By: Tony Mountifield <tony@mountifield.org>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mcfnord
mcfnord force-pushed the enhance-protocol-doc branch from 5d057a5 to 2386d21 Compare July 27, 2026 06:41
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
Comment thread docs/JAMULUS_PROTOCOL.md Outdated
…, set the scene for connection-based vs connectionless, state the retransmit bound

- "connectionless UDP packets" was doubly redundant: UDP is inherently
  both connectionless and packet-based.
- The text used "connection-based" and "established audio connection"
  right after calling the transport connectionless, with no explanation.
  Added a sentence defining what counts as connected in Jamulus terms,
  so the two message-class names have something to refer to.
- The retransmit sentence stopped at "until the acknowledgement arrives".
  There is in fact no retry counter: OnTimerSendMess() re-sends and
  SendMessage() restarts the timer while the queue is non-empty, so the
  loop is bounded only by an ACKN popping the queue or CProtocol::Reset()
  clearing it (disconnect, time-out, protocol disabled). Stated that,
  plus the concrete 400 ms value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread docs/JAMULUS_PROTOCOL.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI generated or potentially AI generated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants