[html5] r5988 - [agiow] (0) Change the maximum size of data stream packets to take into account [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Apr 11 18:57:53 PDT 2011


Author: ianh
Date: 2011-04-11 18:57:52 -0700 (Mon, 11 Apr 2011)
New Revision: 5988

Modified:
   complete.html
   index
   source
Log:
[agiow] (0) Change the maximum size of data stream packets to take into account the min network MTU

Modified: complete.html
===================================================================
--- complete.html	2011-04-12 00:10:09 UTC (rev 5987)
+++ complete.html	2011-04-12 01:57:52 UTC (rev 5988)
@@ -73037,6 +73037,11 @@
     received, a <code title=event-stream-message>message</code>
     event is dispatched at the <code><a href=#peerconnection>PeerConnection</a></code> object.</p>
 
+    <p>The maximum length of <var title="">text</var> is 504 bytes
+    after encoding the string as UTF-8; attempting to send a payload
+    greater than 504 bytes results in an
+    <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception.</p>
+
    </dd>
 
    <dt><var title="">connection</var> . <code title=dom-PeerConnection-addStream><a href=#dom-peerconnection-addstream>addStream</a></code>(<var title="">stream</var>)</dt>
@@ -73449,10 +73454,11 @@
    <li><p>Let <var title="">data</var> be <var title="">message</var>
    encoded as UTF-8. <a href=#refsRFC3629>[RFC3629]</a></li>
 
-   <li><p>If <var title="">data</var> is longer than 65467 bytes,
+   <li><p>If <var title="">data</var> is longer than 504 bytes,
    throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
    steps.</li>
-   <!-- 65470 = 65535 (64K, max IP size) - 40 (IP header) - 8 (UDP header) - 16 (nonce) - 4 (payload type bytes) -->
+   <!-- IPv4: 576 (min IPv4 MTU size) - 20 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 504 -->
+   <!-- IPv6: 1280 (min IPv6 MTU size) - 40 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 1188 -->
 
    <li><p>If the <code><a href=#peerconnection>PeerConnection</a></code>'s
    <a href=#peerconnection-data-udp-media-stream><code>PeerConnection</code> data UDP media stream</a> is
@@ -73804,6 +73810,23 @@
   be precomputed as soon as the <a href=#peerconnection-ice-agent><code>PeerConnection</code> ICE
   Agent</a> is started.</p>
 
+  <div class=note>
+
+  <p>The format of a packet sent over a <a href=#data-udp-media-stream>data UDP media
+  stream</a>, as generated and parsed by the algorithms above, is
+  as follows. The total overhead per packet is thus 44 bytes, of which
+  four are intended for future extensions.</p>
+
+  <pre>
+                /'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.
++--------------+ +---------------+ +-ENCRYPTED------------------------------------------------------------+ :
+| 16 byte hash | | 16 byte nonce | | [ 8 bytes of sequence number ] [ 4 bytes of frame type ] [ data... ] | :
++--------------+ +---------------+ +----------------------------------------------------------------------+ :
+                \...........................................................................................'
+</pre>
+
+  </div>
+
   <p>A <dfn id=remotely-initiated-data-udp-media-stream>remotely-initiated data UDP media stream</dfn> is the
   first "sendrecv" media stream in the initial offer whose media is
   "<code title="">application</code>", whose transport protocol is

Modified: index
===================================================================
--- index	2011-04-12 00:10:09 UTC (rev 5987)
+++ index	2011-04-12 01:57:52 UTC (rev 5988)
@@ -73047,6 +73047,11 @@
     received, a <code title=event-stream-message>message</code>
     event is dispatched at the <code><a href=#peerconnection>PeerConnection</a></code> object.</p>
 
+    <p>The maximum length of <var title="">text</var> is 504 bytes
+    after encoding the string as UTF-8; attempting to send a payload
+    greater than 504 bytes results in an
+    <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception.</p>
+
    </dd>
 
    <dt><var title="">connection</var> . <code title=dom-PeerConnection-addStream><a href=#dom-peerconnection-addstream>addStream</a></code>(<var title="">stream</var>)</dt>
@@ -73459,10 +73464,11 @@
    <li><p>Let <var title="">data</var> be <var title="">message</var>
    encoded as UTF-8. <a href=#refsRFC3629>[RFC3629]</a></li>
 
-   <li><p>If <var title="">data</var> is longer than 65467 bytes,
+   <li><p>If <var title="">data</var> is longer than 504 bytes,
    throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
    steps.</li>
-   <!-- 65470 = 65535 (64K, max IP size) - 40 (IP header) - 8 (UDP header) - 16 (nonce) - 4 (payload type bytes) -->
+   <!-- IPv4: 576 (min IPv4 MTU size) - 20 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 504 -->
+   <!-- IPv6: 1280 (min IPv6 MTU size) - 40 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 1188 -->
 
    <li><p>If the <code><a href=#peerconnection>PeerConnection</a></code>'s
    <a href=#peerconnection-data-udp-media-stream><code>PeerConnection</code> data UDP media stream</a> is
@@ -73814,6 +73820,23 @@
   be precomputed as soon as the <a href=#peerconnection-ice-agent><code>PeerConnection</code> ICE
   Agent</a> is started.</p>
 
+  <div class=note>
+
+  <p>The format of a packet sent over a <a href=#data-udp-media-stream>data UDP media
+  stream</a>, as generated and parsed by the algorithms above, is
+  as follows. The total overhead per packet is thus 44 bytes, of which
+  four are intended for future extensions.</p>
+
+  <pre>
+                /'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.
++--------------+ +---------------+ +-ENCRYPTED------------------------------------------------------------+ :
+| 16 byte hash | | 16 byte nonce | | [ 8 bytes of sequence number ] [ 4 bytes of frame type ] [ data... ] | :
++--------------+ +---------------+ +----------------------------------------------------------------------+ :
+                \...........................................................................................'
+</pre>
+
+  </div>
+
   <p>A <dfn id=remotely-initiated-data-udp-media-stream>remotely-initiated data UDP media stream</dfn> is the
   first "sendrecv" media stream in the initial offer whose media is
   "<code title="">application</code>", whose transport protocol is

Modified: source
===================================================================
--- source	2011-04-12 00:10:09 UTC (rev 5987)
+++ source	2011-04-12 01:57:52 UTC (rev 5988)
@@ -83267,6 +83267,11 @@
     received, a <code title="event-stream-message">message</code>
     event is dispatched at the <code>PeerConnection</code> object.</p>
 
+    <p>The maximum length of <var title="">text</var> is 504 bytes
+    after encoding the string as UTF-8; attempting to send a payload
+    greater than 504 bytes results in an
+    <code>INVALID_ACCESS_ERR</code> exception.</p>
+
    </dd>
 
    <dt><var title="">connection</var> . <code title="dom-PeerConnection-addStream">addStream</code>(<var title="">stream</var>)</dt>
@@ -83765,10 +83770,11 @@
    <li><p>Let <var title="">data</var> be <var title="">message</var>
    encoded as UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p></li>
 
-   <li><p>If <var title="">data</var> is longer than 65467 bytes,
+   <li><p>If <var title="">data</var> is longer than 504 bytes,
    throw an <code>INVALID_ACCESS_ERR</code> exception and abort these
    steps.</p></li>
-   <!-- 65470 = 65535 (64K, max IP size) - 40 (IP header) - 8 (UDP header) - 16 (nonce) - 4 (payload type bytes) -->
+   <!-- IPv4: 576 (min IPv4 MTU size) - 20 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 504 -->
+   <!-- IPv6: 1280 (min IPv6 MTU size) - 40 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 1188 -->
 
    <li><p>If the <code>PeerConnection</code>'s
    <span><code>PeerConnection</code> data UDP media stream</span> is
@@ -84189,6 +84195,23 @@
   be precomputed as soon as the <span><code>PeerConnection</code> ICE
   Agent</span> is started.</p>
 
+  <div class="note">
+
+  <p>The format of a packet sent over a <span>data UDP media
+  stream</span>, as generated and parsed by the algorithms above, is
+  as follows. The total overhead per packet is thus 44 bytes, of which
+  four are intended for future extensions.</p>
+
+  <pre>
+                /'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.
++--------------+ +---------------+ +-ENCRYPTED------------------------------------------------------------+ :
+| 16 byte hash | | 16 byte nonce | | [ 8 bytes of sequence number ] [ 4 bytes of frame type ] [ data... ] | :
++--------------+ +---------------+ +----------------------------------------------------------------------+ :
+                \...........................................................................................'
+</pre>
+
+  </div>
+
   <p>A <dfn>remotely-initiated data UDP media stream</dfn> is the
   first "sendrecv" media stream in the initial offer whose media is
   "<code title="">application</code>", whose transport protocol is




More information about the Commit-Watchers mailing list