Skip to content

Feature set cl message#3727

Draft
pljones wants to merge 2 commits into
jamulussoftware:mainfrom
dingodoppelt:feature-set-cl-message
Draft

Feature set cl message#3727
pljones wants to merge 2 commits into
jamulussoftware:mainfrom
dingodoppelt:feature-set-cl-message

Conversation

@pljones
Copy link
Copy Markdown
Collaborator

@pljones pljones commented Jun 6, 2026

Short description of changes

Adds two new connection-less protocol messages, one to request and one to return server features.

CHANGELOG: Request and receive server features by connection-less message

Context: Fixes an issue?

Fixes 3710

Does this change need documentation? What needs to be documented and how?

Yes. See below. Will also need updates to Client and Server documentation.

Status of this Pull Request

Proof of concept. Needs:

  • Confirmation of solution
  • JSONRPC support
  • Connect Dialog support

What is missing until this pull request can be merged?

See above.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

Comment thread src/server.cpp
{
uint32_t iFeatures = 0;

iFeatures |= ( !bUseDoubleSystemFrameSize << FS_SMALL_NETW_BUF );
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Don't conflate "small network buffers" in the client with "double frame size" in the server -- you've looked at this now 😄.

Comment thread src/util.h
enum EFeatureSet
{
// used for protocol -> enum values must be fixed
FS_SMALL_NETW_BUF = 0,
Copy link
Copy Markdown
Collaborator Author

@pljones pljones Jun 6, 2026

Choose a reason for hiding this comment

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

This should be FS_FAST_UPDATE and be true if bUseDoubleSystemFrameSize is false.

Comment thread src/util.h
FS_MULTITHREADING = 1,
FS_RECORDER_INIT = 2,
FS_DISABLE_RECORDING = 3,
FS_IS_RECORDING = 4,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we need three flags:

  • FS_RECORDER_ENABLED - true if GetRecorderInitialised() && !GetDisableRecording()
  • FS_IS_RECORDING - true if JamController.GetRecorderState() == RS_RECORDING (you had !=?)

Comment thread src/util.h
FS_DELAY_PAN = 5,
FS_ENABLE_IPV6 = 6,
FS_RAW_AUDIO = 7
};
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Might be worth adding:

  • FS_DISCONONQUIT -- true if the connection will drop if the server exits

@ann0see
Copy link
Copy Markdown
Member

ann0see commented Jun 6, 2026

Could you please also check which protocol messages could be replaced by this?

Comment thread src/protocol.cpp
(standard re-registration timeout).


- PROTMESSID_CLM_SERVER_INFO: Bitmask of enabled server features
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.

I initially phrased it as "capabilities". FYI.

There were old versions which didn't support panning I think. Assuming this message was already implemented at this time, We would have used this message to advertise pan support.

In think we should make it very clear what this message can and cannot encode

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's a new message being added for this new feature.

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.

Yes. I know. But we should specify what this feature can and what it can't expose. I'm thinking of a specification/architectural viewpoint

Comment thread src/server.cpp
iFeatures |= ( (JamController.GetRecorderState() != RS_RECORDING) << FS_IS_RECORDING );
iFeatures |= ( bDelayPan << FS_DELAY_PAN );
iFeatures |= ( bEnableIPv6 << FS_ENABLE_IPV6 );
// iFeatures |= ( bDisableRaw << FS_RAW_AUDIO );
Copy link
Copy Markdown
Member

@ann0see ann0see Jun 6, 2026

Choose a reason for hiding this comment

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

Shouldn't be un commented?

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.

Maybe add "has welcome message" also

@pljones
Copy link
Copy Markdown
Collaborator Author

pljones commented Jun 6, 2026

My view is that it's exposing the operating state of the Server.

If you're running with the UI or using JSONRPC, some state can change (one day, it'll all be controllable, hopefully).

However, it's not for large blocks of data: client list, welcome message, etc.

I see it as providing answers to questions a Client user might have about Server capabilities (I also favour using that term) - so on/off states.

That's why I think it should be stuff that gets shown on the Connect Dialog (although I'm thinking of a "toggle extra connect info" option in Advanced Settings).

@ann0see
Copy link
Copy Markdown
Member

ann0see commented Jun 6, 2026

Ok. Can it be used by the client to to enable/disable certain features such as raw audio?
I would say yes.

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