-
Notifications
You must be signed in to change notification settings - Fork 246
Feature set cl message #3727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature set cl message #3727
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| \******************************************************************************/ | ||
|
|
||
| #include "server.h" | ||
| #include "util.h" | ||
|
|
||
| // CServer implementation ****************************************************** | ||
| CServer::CServer ( const int iNewMaxNumChan, | ||
|
|
@@ -269,6 +270,8 @@ CServer::CServer ( const int iNewMaxNumChan, | |
|
|
||
| QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqConnClientsList, this, &CServer::OnCLReqConnClientsList ); | ||
|
|
||
| QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqServerInfo, this, &CServer::OnCLReqServerInfo ); | ||
|
|
||
| QObject::connect ( &ServerListManager, &CServerListManager::SvrRegStatusChanged, this, &CServer::SvrRegStatusChanged ); | ||
|
|
||
| QObject::connect ( &JamController, &recorder::CJamController::RestartRecorder, this, &CServer::RestartRecorder ); | ||
|
|
@@ -450,6 +453,22 @@ void CServer::OnNewConnection ( int iChID, int iTotChans, CHostAddress RecHostAd | |
| Logging.AddNewConnection ( RecHostAddr.InetAddr, iTotChans ); | ||
| } | ||
|
|
||
| void CServer::OnCLReqServerInfo ( CHostAddress RecHostAddr ) | ||
| { | ||
| uint32_t iFeatures = 0; | ||
|
|
||
| iFeatures |= ( !bUseDoubleSystemFrameSize << FS_SMALL_NETW_BUF ); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 😄. |
||
| iFeatures |= ( bUseMultithreading << FS_MULTITHREADING ); | ||
| iFeatures |= ( GetRecorderInitialised() << FS_RECORDER_INIT ); | ||
| iFeatures |= ( GetDisableRecording() << FS_DISABLE_RECORDING ); | ||
| iFeatures |= ( (JamController.GetRecorderState() != RS_RECORDING) << FS_IS_RECORDING ); | ||
| iFeatures |= ( bDelayPan << FS_DELAY_PAN ); | ||
| iFeatures |= ( bEnableIPv6 << FS_ENABLE_IPV6 ); | ||
| // iFeatures |= ( bDisableRaw << FS_RAW_AUDIO ); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't be un commented? |
||
|
|
||
| ConnLessProtocol.CreateCLServerInfoMes ( RecHostAddr, iFeatures ); | ||
| } | ||
|
|
||
| void CServer::OnServerFull ( CHostAddress RecHostAddr ) | ||
| { | ||
| // note: no mutex required here | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -591,6 +591,20 @@ enum EDirectoryType | |
| AT_CUSTOM = 7 // Must be the last entry! | ||
| }; | ||
|
|
||
| // Server feature set ---------------------------------------------------------- | ||
| enum EFeatureSet | ||
| { | ||
| // used for protocol -> enum values must be fixed | ||
| FS_SMALL_NETW_BUF = 0, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
| FS_MULTITHREADING = 1, | ||
| FS_RECORDER_INIT = 2, | ||
| FS_DISABLE_RECORDING = 3, | ||
| FS_IS_RECORDING = 4, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need three flags:
|
||
| FS_DELAY_PAN = 5, | ||
| FS_ENABLE_IPV6 = 6, | ||
| FS_RAW_AUDIO = 7 | ||
| }; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be worth adding:
|
||
|
|
||
| inline QString DirectoryTypeToString ( EDirectoryType eAddrType ) | ||
| { | ||
| switch ( eAddrType ) | ||
|
|
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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