fix #2841 by adding dynamic options #6013
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since no one liked the idea of saving the server config to a file as in #5153, I decided to try getting all the optional arguments from the client using the first connected socket. The required/important arguments, in contrast, are still given on the command line just like before, but should no longer exceed the character limit of 255.
As of now, the command-line-only arguments are:
The optional arguments are received once after the dummy byte is sent (if enabled) and are expected as 4-byte length-prefixed JSON data.
I'm sure there are better ways to do this, but I think this approach might be acceptable because:
Some drawbacks are:
Closes #2841
Closes #5153
EDIT
I forgot all the "list_*" arguments like "list_encoders" but imo they should be used separately.