Skip to content
Permalink
Browse files
[giow] (0) You send ArrayBufferViews, not ArrayBuffers.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16708
Affected topics: WebSocket API

git-svn-id: http://svn.whatwg.org/webapps@7085 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 2, 2012
1 parent a817b04 commit 1c8dffa167b0a5967cea3d31d8bac704d9e5d51f
Showing with 42 additions and 33 deletions.
  1. +14 −11 complete.html
  2. +14 −11 index
  3. +14 −11 source
@@ -81160,7 +81160,7 @@ <h4 id=the-websocket-interface><span class=secno>10.3.2 </span>The <code><a href
[TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-websocket-onmessage title=handler-WebSocket-onmessage>onmessage</a>;
attribute DOMString <a href=#dom-websocket-binarytype title=dom-WebSocket-binaryType>binaryType</a>;
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(DOMString data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<a href=#arraybuffer>ArrayBuffer</a> data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<span>ArrayBufferView</span> data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<a href=#blob>Blob</a> data);
};</pre>

@@ -81531,7 +81531,7 @@ <h4 id=the-websocket-interface><span class=secno>10.3.2 </span>The <code><a href
</dd>


<dt>If the argument is an <code><a href=#arraybuffer>ArrayBuffer</a></code> object</dt>
<dt>If the argument is an <code>ArrayBufferView</code> object</dt>

<dd>

@@ -81542,15 +81542,18 @@ <h4 id=the-websocket-interface><span class=secno>10.3.2 </span>The <code><a href
buffer is full, the user agent must <i><a href=#close-the-websocket-connection>close the WebSocket
connection</a></i> <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>with
prejudice</a>. The data to be sent is the data stored in the
buffer described by the <code><a href=#arraybuffer>ArrayBuffer</a></code> object. <!-- that
sentence is meant to invoke "The ArrayBuffer type describes a
buffer used to store data for the array buffer views." at the top
of the Typed Array spec --> Any invocation of this method with an
<code><a href=#arraybuffer>ArrayBuffer</a></code> argument that does not throw an exception
must increase the <code title=dom-WebSocket-bufferedAmount><a href=#dom-websocket-bufferedamount>bufferedAmount</a></code>
attribute by the length of the <code><a href=#arraybuffer>ArrayBuffer</a></code> in bytes.
<!-- that sentence is meant to invoke the same as
ArrayBuffer.byteLength --> <a href=#refsWSP>[WSP]</a> <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
section of the buffer described by the <code><a href=#arraybuffer>ArrayBuffer</a></code>
object that the <code>ArrayBufferView</code> object references.
<!-- that sentence is meant to invoke "The ArrayBuffer type
describes a buffer used to store data for the array buffer views."
at the top of the Typed Array spec, and "Optional byteOffset and
length can be used to limit the section of the buffer referenced"
in the definition of the TypedArray constructor --> Any invocation
of this method with an <code>ArrayBufferView</code> argument that
does not throw an exception must increase the <code title=dom-WebSocket-bufferedAmount><a href=#dom-websocket-bufferedamount>bufferedAmount</a></code>
attribute by the length of the <code>ArrayBufferView</code> in
bytes. <!-- that sentence is meant to invoke the same as
ArrayBufferView.byteLength --> <a href=#refsWSP>[WSP]</a> <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>

</dd>

25 index
@@ -81160,7 +81160,7 @@ interface <dfn id=websocket>WebSocket</dfn> : <a href=#eventtarget>EventTarget</
[TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-websocket-onmessage title=handler-WebSocket-onmessage>onmessage</a>;
attribute DOMString <a href=#dom-websocket-binarytype title=dom-WebSocket-binaryType>binaryType</a>;
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(DOMString data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<a href=#arraybuffer>ArrayBuffer</a> data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<span>ArrayBufferView</span> data);
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<a href=#blob>Blob</a> data);
};</pre>

@@ -81531,7 +81531,7 @@ socket.onopen = function () {
</dd>


<dt>If the argument is an <code><a href=#arraybuffer>ArrayBuffer</a></code> object</dt>
<dt>If the argument is an <code>ArrayBufferView</code> object</dt>

<dd>

@@ -81542,15 +81542,18 @@ socket.onopen = function () {
buffer is full, the user agent must <i><a href=#close-the-websocket-connection>close the WebSocket
connection</a></i> <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>with
prejudice</a>. The data to be sent is the data stored in the
buffer described by the <code><a href=#arraybuffer>ArrayBuffer</a></code> object. <!-- that
sentence is meant to invoke "The ArrayBuffer type describes a
buffer used to store data for the array buffer views." at the top
of the Typed Array spec --> Any invocation of this method with an
<code><a href=#arraybuffer>ArrayBuffer</a></code> argument that does not throw an exception
must increase the <code title=dom-WebSocket-bufferedAmount><a href=#dom-websocket-bufferedamount>bufferedAmount</a></code>
attribute by the length of the <code><a href=#arraybuffer>ArrayBuffer</a></code> in bytes.
<!-- that sentence is meant to invoke the same as
ArrayBuffer.byteLength --> <a href=#refsWSP>[WSP]</a> <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
section of the buffer described by the <code><a href=#arraybuffer>ArrayBuffer</a></code>
object that the <code>ArrayBufferView</code> object references.
<!-- that sentence is meant to invoke "The ArrayBuffer type
describes a buffer used to store data for the array buffer views."
at the top of the Typed Array spec, and "Optional byteOffset and
length can be used to limit the section of the buffer referenced"
in the definition of the TypedArray constructor --> Any invocation
of this method with an <code>ArrayBufferView</code> argument that
does not throw an exception must increase the <code title=dom-WebSocket-bufferedAmount><a href=#dom-websocket-bufferedamount>bufferedAmount</a></code>
attribute by the length of the <code>ArrayBufferView</code> in
bytes. <!-- that sentence is meant to invoke the same as
ArrayBufferView.byteLength --> <a href=#refsWSP>[WSP]</a> <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>

</dd>

25 source
@@ -94298,7 +94298,7 @@ interface <dfn>WebSocket</dfn> : <span>EventTarget</span> {
[TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-WebSocket-onmessage">onmessage</span>;
attribute DOMString <span title="dom-WebSocket-binaryType">binaryType</span>;
void <span title="dom-WebSocket-send">send</span>(DOMString data);
void <span title="dom-WebSocket-send">send</span>(<span>ArrayBuffer</span> data);
void <span title="dom-WebSocket-send">send</span>(<span>ArrayBufferView</span> data);
void <span title="dom-WebSocket-send">send</span>(<span>Blob</span> data);
};</pre>

@@ -94754,7 +94754,7 @@ socket.onopen = function () {
</dd>


<dt>If the argument is an <code>ArrayBuffer</code> object</dt>
<dt>If the argument is an <code>ArrayBufferView</code> object</dt>

<dd>

@@ -94767,16 +94767,19 @@ socket.onopen = function () {
buffer is full, the user agent must <i>close the WebSocket
connection</i> <span title="concept-websocket-close-fail">with
prejudice</span>. The data to be sent is the data stored in the
buffer described by the <code>ArrayBuffer</code> object. <!-- that
sentence is meant to invoke "The ArrayBuffer type describes a
buffer used to store data for the array buffer views." at the top
of the Typed Array spec --> Any invocation of this method with an
<code>ArrayBuffer</code> argument that does not throw an exception
must increase the <code
section of the buffer described by the <code>ArrayBuffer</code>
object that the <code>ArrayBufferView</code> object references.
<!-- that sentence is meant to invoke "The ArrayBuffer type
describes a buffer used to store data for the array buffer views."
at the top of the Typed Array spec, and "Optional byteOffset and
length can be used to limit the section of the buffer referenced"
in the definition of the TypedArray constructor --> Any invocation
of this method with an <code>ArrayBufferView</code> argument that
does not throw an exception must increase the <code
title="dom-WebSocket-bufferedAmount">bufferedAmount</code>
attribute by the length of the <code>ArrayBuffer</code> in bytes.
<!-- that sentence is meant to invoke the same as
ArrayBuffer.byteLength --> <a href="#refsWSP">[WSP]</a> <a
attribute by the length of the <code>ArrayBufferView</code> in
bytes. <!-- that sentence is meant to invoke the same as
ArrayBufferView.byteLength --> <a href="#refsWSP">[WSP]</a> <a
href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>

</dd>

0 comments on commit 1c8dffa

Please sign in to comment.