-
Notifications
You must be signed in to change notification settings - Fork 115
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
RTCSctpTransport: Specify special cases for maxMessageSize #1656
Conversation
… updating via O/A exchange)
@lgrahl, can you take a look please? |
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.
This looks good to me. Thanks @adam-be.
</li> | ||
<li> | ||
<p>Let <var>remoteMaxMessageSize</var> be the value of the | ||
"max-message-size" SDP attribute read from the remote description, |
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.
Do we need to add from the SCTP transport's SDP media section or is this clear to the reader?
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.
Most of our references with specific section numbers are automatically generated to not get out of sync with the external document. But there are "hard-coded" one too, so I guess it woudn't be too bad to add a reference to a top-level section here.
<li> | ||
<p>Let <var>canSendSize</var> be the number of bytes that this | ||
client can send (i.e. the size of the local send buffer) or 0 if | ||
the implementation can handle messages of any size.</p> |
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.
Note: In the W3C API, sending messages of any size is impossible at the moment (the API lacks the possibility to send partial messages) but I think it's good to have it in there already to be future-proof (and as a note for implementations outside of the browser).
@adam-be will look into writing a test for this before merging. |
webrtc.html
Outdated
<li> | ||
<p>If either <var>remoteMaxMessageSize</var> or | ||
<var>canSendSize</var> is 0, set <a>[[\MaxMessageSize]]</a> to the | ||
larger of the two.</p> |
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.
Although this is algorithmically fine for the both 0
case as the result of max(0, 0) == 0
is correct, it might be a bit confusing to the reader.
API style level question: Is there an argument for why a dedicated value (0) for maxMessageSize is a more user-friendly API than maxMessageSize = Number.MAX_SAFE_INTEGER, Number.MAX_VALUE or Number.POSITIVE_INFINITY? |
@alvestrand, we borrow the magic number zero from the signaling. But I agree that |
Agreed, API-wise, Edit: Will need updating of https://github.com/webrtc/adapter/pull/702 |
Another note: This would probably require changing the type of the |
UNSIGNED LONG is fine for MAX_SAFE_INTEGER but not for the infinities. |
Okay. But I'd really like to avoid those discrete integers as they semantically don't fit into the scope of arbitrary sized messages. While I agree that messages of that size are an academic problem, I'd prefer a semantically correct API. |
I'll update the PR to use |
(including updating via O/A exchange)
Fixes #1446