Skip to content

Commit

Permalink
Merge pull request #1209 from taylor-b/issue_1148_dc_send_exception
Browse files Browse the repository at this point in the history
Throw error if data channel's buffer is filled, rather than closing.
  • Loading branch information
aboba committed Jun 15, 2017
2 parents cc8635f + 81de077 commit 51159df
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions webrtc.html
Expand Up @@ -9047,8 +9047,8 @@ <h2>Dictionary <dfn>RTCDataChannelInit</dfn> Members</h2>
</li>
<li>
<p>If <var>channel</var>'s <a data-for=
"RTCDataChannel"><code>readyState</code></a> attribute is
<code>connecting</code>, <a>throw</a> an
"RTCDataChannel"><code>readyState</code></a> attribute is not
<code>open</code>, <a>throw</a> an
<code>InvalidStateError</code>.</p>
</li>
<li>
Expand Down Expand Up @@ -9094,11 +9094,20 @@ <h2>Dictionary <dfn>RTCDataChannelInit</dfn> Members</h2>
started, then abort these steps.</p>
</li>
<li>
<p>Attempt to send <var>data</var> on <var>channel</var>'s
<a>underlying data transport</a>; if the data cannot be sent, e.g.
because it would need to be buffered but the buffer is full, the user
agent MUST abruptly <a>close</a> <var>channel</var>'s <a>underlying
data transport</a> <a>with an error</a>.</p>
<p>If the size of <var>data</var> exceeds the value of <code><a
data-link-for="RTCSctpTransport">maxMessageSize</a></code> on
<var>channel</var>'s associated <code>RTCSctpTransport</code>,
<a>throw</a> a <code>TypeError</code>.</p>
</li>
<li>
<p>Queue <var>data</var> for transmission on <var>channel</var>'s
<a>underlying data transport</a>. If queuing <var>data</var> is not
possible because not enough buffer space is available, <a>throw</a>
an <code>OperationError</code>.</p>
<div class="note">The actual transmission of data occurs in
parallel. If sending data leads to an SCTP-level error, the
application will be notified asynchronously through <code><a
data-link-for="RTCDataChannel">onerror</a></code>.</div>
</li>
</ol>
<div>
Expand Down

0 comments on commit 51159df

Please sign in to comment.