-
Notifications
You must be signed in to change notification settings - Fork 872
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
Fixed documentation on option restrictions #1759
Fixed documentation on option restrictions #1759
Conversation
Not every option must be pre-bind. This concerns exclusively options that:
The following options are currently marked pre-bind. Need to check those that REALLY HAVE TO be pre-bind. This is to be reviewed and options that are not checked here below should get the restrictions lifted up to "connected".
|
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.
Consider minor comments.
Also would be good to split documentation change and SRTO_BINDTODEVICE
into different commits for merging (or PRs).
docs/APISocketOptions.md
Outdated
- `pre-bind`: Like `pre`, but the option is not allowed to be altered after | ||
calling `srt_bind()`. |
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.
Maybe some note would be useful here, mentioning that srt_connect()
will bind implicitly even if srt_bind(..)
was not called.
Or:
"Like pre
, but additionally the option is not allowed to be altered after calling srt_bind()
, whichever happens first."
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.
Maybe even "pre-bind" should go before "pre" as more restrictive.
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.
Maybe it's more restrictive, but OTOH it's less common among options. Mentioning this bind-when-connect might be a good idea.
|
Possible. Depends on whether altering this option could destroy some algorithm during the transmission, or refers to some resource of the multiplexer. |
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.
Minor edits
docs/APISocketOptions.md
Outdated
- `pre-bind`: The option cannot be altered on a socket that is already bound (by calling | ||
`srt_bind()` or any other function doing this, including automatic binding when trying to | ||
connect, as well as accepted sockets). | ||
**NOTE**: The `pre-bind` characteristic applies exclusively to options that: | ||
- Change the behavior and functionality of the `srt_bind` call | ||
- Concern or set an option on the internally used UDP socket | ||
- Concern any kind of resource used by the multiplexer |
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.
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 moved the "NOTE" sentence up into the preceding paragraph because the extra indentation was applying code format to the text.
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.
Yeah, but it doesn't work. I think it would be simply easier if this whole NOTE with the enumeration is moved past the post entry as a new paragraph
- `pre-bind`: The option cannot be altered on a socket that is already bound (by calling | ||
`srt_bind()` or any other function doing this, including automatic binding when trying to | ||
connect, as well as accepted sockets). |
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.
- `pre-bind`: The option cannot be altered on a socket that is already bound (by calling | |
`srt_bind()` or any other function doing this, including automatic binding when trying to | |
connect, as well as accepted sockets). | |
- `pre-bind`: The option cannot be altered on a socket that is already bound (by calling `srt_bind()` or any other function doing this, including automatic binding when trying to connect, as well as accepted sockets). The `pre-bind` characteristic applies exclusively to options that: | |
- change the behavior and functionality of the `srt_bind` call | |
- concern or set an option on the internally used UDP socket | |
- concern any kind of resource used by the multiplexer``` |
Fixes #1747
Fixed description on options restrictions:
There's a problem here though. Only some selected options should not be altered after binding, as binding applies some very specific settings that must be applied before and these settings apply to the binding process itself. ONLY those options should be "pre-bind", all others that are connection-restricted, should be "pre". Fixing this should be done also in the code so that it's connected state, not open state checked in the option setting procedure.