Skip to content

feat: add CLM request for channel level list (message ID 1028)#3725

Open
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:feature/clm-req-channel-level-list
Open

feat: add CLM request for channel level list (message ID 1028)#3725
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:feature/clm-req-channel-level-list

Conversation

@mcfnord
Copy link
Copy Markdown
Contributor

@mcfnord mcfnord commented Jun 5, 2026

Summary

Adds PROTMESSID_CLM_REQ_CHANNEL_LEVEL_LIST (ID 1028): a new connectionless message that causes a server to immediately reply with the existing PROTMESSID_CLM_CHANNEL_LEVEL_LIST (ID 1015) response.

This follows the established CLM request/response pattern used by:

  • CLReqConnClientsList (1014) → CLConnClientsList (1013)
  • CLReqVersionAndOS (1012) → CLVersionAndOS (1011)
  • CLReqServerList (1007) → CLServerList (1002)

Numbered 1028 because 28 also does this.

Implementation

4 files, 19 lines:

  • protocol.h — define ID 1028, declare evaluator, declare signal
  • protocol.cpp — add switch case and one-line EvaluateCLReqChannelLevelListMes that emits the signal
  • server.h — one-line OnCLReqChannelLevelList slot that calls the existing CreateCLChannelLevelListMes
  • server.cpp — connect signal to slot

Zero additional computation. vecChannelLevels is already computed every server tick in OnTimer(). The handler simply forwards that existing data to the requester.

Use case

A monitoring tool can poll the activity level on any Jamulus server by sending a single UDP datagram to the server's game port and reading the nibble-packed level list in the 1015 response. No audio connection, no additional open ports, no configuration required.

The 1015 response already encodes the number of connected clients implicitly (the list length), so the caller can detect idle servers (no clients) versus quiet ones (clients present but all levels ≤ threshold).

Relation to prior PR

This supersedes #3724.

Adds PROTMESSID_CLM_REQ_CHANNEL_LEVEL_LIST (1028): a connectionless
request that causes the server to immediately reply with the existing
PROTMESSID_CLM_CHANNEL_LEVEL_LIST (1015) response.

This follows the established CLM request/response pattern used by
CLReqConnClientsList (1014 → 1013), CLReqVersionAndOS (1012 → 1011),
and CLReqServerList (1007 → 1002).

The implementation is zero-cost: vecChannelLevels is already computed
every server tick in OnTimer(). The handler simply forwards that existing
data to the requesting address.

Use case: external monitors can poll silence/activity level on any
Jamulus server by sending a single UDP datagram to the server's game
port, without establishing an audio connection or requiring additional
open ports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@ann0see ann0see left a comment

Choose a reason for hiding this comment

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

Way better!

@pljones
Copy link
Copy Markdown
Collaborator

pljones commented Jun 5, 2026

Yes, much better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants