mozilla

Revision 347321 of WebSockets

  • Enlace amigable (slug) de la revisión: en/WebSockets
  • Título de la revisión: WebSockets
  • Id de la revisión: 347321
  • Creada:
  • Creador: mserracaldentey
  • ¿Es la revisión actual?
  • Comentario To translate the site into Spanish.
Etiquetas: 

Contenido de la revisión

WebSockets es una tecnología avanzada que hace posible abrir una sesión de comunicación interactiva entre el navegador del usuario y un servidor. Con esta  API, puede envia mensages a un servidor y  recibir  respuestas controladas por eventos sin tener que consultar al servidor para una respuesta..

DocumentaCión

Escribir aplicaciones cliente WebSocket
Una guía tutorial para escribir clientes WebSocket para ejecutarse en el browser.
Referencia WebSockets
Una referencia de la API de cliente WebSocket.
(TBD) El protocolo WebSocket
Una referencia del protocolo WebSocket.
(TBD) Escribiendo servidores WebSocket
Una guía para escribir código del lado del servidor para manejar el protocolo WebSocket.

Ver Todo...

Herramientas

Ver también

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Version -76 support {{obsolete_inline}} 6 {{CompatGeckoDesktop("2.0")}} {{CompatNo}} 11.00 (disabled) 5.0.1
Protocol version 7 support {{CompatNo}} {{CompatGeckoDesktop("6.0")}}
{{property_prefix("Moz")}}
{{CompatNo}} {{CompatNo}} {{CompatNo}}
Protocol version 10 support 14 {{CompatGeckoDesktop("7.0")}}
{{property_prefix("Moz")}}
HTML5 Labs {{CompatUnknown}} {{CompatUnknown}}
RFC 6455 Support (IETF Draft 17) 16 {{CompatGeckoDesktop("11.0")}} 10 12.10 {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Version -76 support {{obsolete_inline}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Protocol version 7 support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Protocol version 8 support (IETF draft 10) {{CompatUnknown}} {{CompatGeckoMobile("7.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
RFC 6455 Support (IETF Draft 17) 16 {{CompatGeckoDesktop("11.0")}} {{CompatUnknown}} 12.10 {{CompatUnknown}}

Gecko notes

WebSockets support in Firefox is continuing to track the evolving WebSocket specification. Firefox 6 implements version 7 of the underlying protocol, while Firefox 7 implements version 8 (as specified by IETF draft 10). Firefox mobile received WebSocket support in Firefox mobile 7.0.

Gecko 6.0

Prior to Gecko 6.0 {{geckoRelease("6.0")}}, there was, incorrectly, a WebSocket object that some sites were thinking implied that WebSocket services were not prefixed; this object has been renamed to MozWebSocket.

Gecko 7.0

Starting in Gecko 7.0 {{geckoRelease("7.0")}}, the network.websocket.max-connections preference is used to determine the maximum number of WebSocket connections that can be open at a time. The default value is 200.

Gecko 8.0

Starting in Gecko 8.0 {{geckoRelease("8.0")}}, the deflate-stream extension to the WebSocket protocol has been disabled, since it's been deprecated from the specification drafts. This resolves incompatibilities with some sites.

Gecko 11.0

Prior to Gecko 11.0, both incoming and outgoing messages were limited to 16 MB in size. They may now be up to 2 GB in size. Note, however, that memory limitations (especially on mobile devices) make that a theoretical maximum, not a practical one. In reality, transfers of that size will fail on devices that don't have enough memory.

Additionally, ArrayBuffer send and receive support for binary data has been implemented.

Starting in Gecko 11.0, the WebSocket API is no longer prefixed.

Warning: Among other things, a key reason WebSockets was disabled by default in Firefox 4 and 5 is the discovery of a security issue in the protocol's design. This was fixed in Firefox 6 by implementing a newer version of the protocol that corrects the problem.
{{HTML5ArticleTOC}}

Fuente de la revisión

<p>WebSockets es una tecnología avanzada que hace posible abrir una sesión de comunicación interactiva entre el navegador del usuario y un servidor. Con esta&nbsp; API, puede envia mensages a un servidor y&nbsp; recibir&nbsp; respuestas controladas por eventos sin tener que consultar al servidor para una respuesta..</p>
<div class="cleared row topicpage-table">
  <div class="section">
    <h2 class="Documentation" id="Documentation" name="Documentation">DocumentaCión</h2>
    <dl>
      <dt>
        <a href="/en-US/docs/WebSockets/Writing_WebSocket_client_applications" title="WebSockets/Writing WebSocket client applications">Escribir aplicaciones cliente WebSocket</a></dt>
      <dd>
        Una guía tutorial para escribir clientes WebSocket para ejecutarse en el browser.</dd>
      <dt>
        <a href="/en-US/docs/WebSockets/WebSockets_reference" title="WebSockets/WebSockets reference">Referencia WebSockets</a></dt>
      <dd>
        Una referencia de la API de cliente WebSocket.</dd>
      <dt>
        <a href="/en-US/docs/WebSockets/The_WebSocket_protocol" title="WebSockets/The WebSocket protocol">(TBD) El protocolo WebSocket</a></dt>
      <dd>
        Una referencia del protocolo WebSocket.</dd>
      <dt>
        <a href="/en-US/docs/WebSockets/Writing_WebSocket_servers" title="WebSockets/Writing WebSocket servers">(TBD) Escribiendo servidores WebSocket</a></dt>
      <dd>
        Una guía para escribir código del lado del servidor para manejar el protocolo WebSocket.</dd>
    </dl>
    <p><span class="alllinks"><a href="/en-US/docs/tag/WebSockets" title="tag/WebSockets">Ver Todo...</a></span></p>
  </div>
  <div class="section">
    <h2 class="Tools" id="Tools" name="Tools">Herramientas</h2>
    <ul>
      <li><a class="external" href="http://socket.io" title="http://socket.io/">Socket.IO</a>: Una poderosa multi-plataforma API WebSocket para <a class="external" href="http://nodejs.org" title="http://nodejs.org/">Node.js</a>.</li>
      <li><a class="link-https" href="https://github.com/Worlize/WebSocket-Node" title="https://github.com/Worlize/WebSocket-Node">WebSocket-Node</a>: Un servidor WebSocket API implementado para <a class="external" href="http://nodejs.org" title="http://nodejs.org/">Node.js</a>.</li>
      <li><a href="http://ajf.me/websocket/#libs" title="http://websocket.us/#libs">Una lista más extensiva de frameworks y bibliotecas aquí</a></li>
    </ul>
    <h2 class="Related_Topics" id="Related_Topics" name="Related_Topics">Temas RELACIONADOS</h2>
    <ul>
      <li><a href="/en-US/docs/AJAX" title="AJAX">AJAX</a>, <a href="/en-US/docs/JavaScript" title="JavaScript">JavaScript</a></li>
    </ul>
  </div>
</div>
<h2 id="See_also">Ver también</h2>
<ul>
  <li><a class="external" href="http://tools.ietf.org/html/rfc6455">RFC 6455 - The WebSocket Protocol</a></li>
  <li><a class="external" href="http://www.w3.org/TR/websockets/">WebSocket API Specification</a></li>
  <li><a href="/en-US/docs/Server-sent_events" title="Server-sent_events">Server-Sent Events</a></li>
  <li><a class="external" href="http://websocket.us/">WebSocket.us</a> - a community-run, not-for-profit site about WebSocket</li>
</ul>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Version -76 support {{obsolete_inline}}</td>
        <td>6</td>
        <td>{{CompatGeckoDesktop("2.0")}}</td>
        <td>{{CompatNo}}</td>
        <td>11.00 (disabled)</td>
        <td>5.0.1</td>
      </tr>
      <tr>
        <td>Protocol version 7 support</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatGeckoDesktop("6.0")}}<br />
          {{property_prefix("Moz")}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
      </tr>
      <tr>
        <td>Protocol version 10 support</td>
        <td>14</td>
        <td>{{CompatGeckoDesktop("7.0")}}<br />
          {{property_prefix("Moz")}}</td>
        <td>HTML5 Labs</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td>RFC 6455 Support (IETF Draft 17)</td>
        <td>16</td>
        <td>{{CompatGeckoDesktop("11.0")}}</td>
        <td>10</td>
        <td>12.10</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Version -76 support {{obsolete_inline}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td>Protocol version 7 support</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td>Protocol version 8 support (IETF draft 10)</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatGeckoMobile("7.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td>RFC 6455 Support (IETF Draft 17)</td>
        <td>16</td>
        <td>{{CompatGeckoDesktop("11.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>12.10</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h3 id="Gecko_notes">Gecko notes</h3>
<p>WebSockets support in Firefox is continuing to track the evolving WebSocket specification. Firefox 6 implements version 7 of the underlying protocol, while Firefox 7 implements version 8 (as specified by IETF draft 10). Firefox mobile received WebSocket support in Firefox mobile 7.0.</p>
<h4 id="Gecko_6.0">Gecko 6.0</h4>
<p>Prior to Gecko 6.0 {{geckoRelease("6.0")}}, there was, incorrectly, a <code>WebSocket</code> object that some sites were thinking implied that <code>WebSocket</code> services were not prefixed; this object has been renamed to <code>MozWebSocket</code>.</p>
<h4 id="Gecko_7.0">Gecko 7.0</h4>
<p>Starting in Gecko 7.0 {{geckoRelease("7.0")}}, the <code>network.websocket.max-connections</code> preference is used to determine the maximum number of WebSocket connections that can be open at a time. The default value is 200.</p>
<h4 id="Gecko_8.0">Gecko 8.0</h4>
<p>Starting in Gecko 8.0 {{geckoRelease("8.0")}}, the deflate-stream extension to the WebSocket protocol has been disabled, since it's been deprecated from the specification drafts. This resolves incompatibilities with some sites.</p>
<h4 id="Gecko_11.0">Gecko 11.0</h4>
<p>Prior to Gecko 11.0, both incoming and outgoing messages were limited to 16 MB in size. They may now be up to 2 GB in size. Note, however, that memory limitations (especially on mobile devices) make that a theoretical maximum, not a practical one. In reality, transfers of that size will fail on devices that don't have enough memory.</p>
<p>Additionally, ArrayBuffer send and receive support for binary data has been implemented.</p>
<p>Starting in Gecko 11.0, the WebSocket API is no longer prefixed.</p>
<div class="warning">
  <strong>Warning:</strong> Among other things, a key reason WebSockets was disabled by default in Firefox 4 and 5 is the discovery of a <a class="external" href="http://www.ietf.org/mail-archive/web/hybi/current/msg04744.html" title="http://www.ietf.org/mail-archive/web/hybi/current/msg04744.html">security issue in the protocol's design</a>. This was fixed in Firefox 6 by implementing a newer version of the protocol that corrects the problem.</div>
<div>
  {{HTML5ArticleTOC}}</div>
Revertir a esta revisión