This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23938 - var connection = new WebSocket('ws://html5rocks.websocket.org/echo', ['soap', 'xmpp']);// When the connection is open, send some data to the server connection.onopen = function () { connection.sen [...]
Summary: var connection = new WebSocket('ws://html5rocks.websocket.org/echo', ['soap',...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 23937 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-28 06:01 UTC by contributor
Modified: 2013-12-02 20:22 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2013-11-28 06:01:33 UTC
Specification: http://dev.w3.org/html5/websockets/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top
Referrer: 

Comment:
var connection = new WebSocket('ws://html5rocks.websocket.org/echo', ['soap',
'xmpp']);// When the connection is open, send some data to the server
connection.onopen = function () {
  connection.send('Ping'); // Send the message 'Ping' to the server
};

// Log errors
connection.onerror = function (error) {
  console.log('WebSocket Error ' + error);
};

// Log messages from the server
connection.onmessage = function (e) {
  console.log('Server: ' + e.data);
};

Posted from: 187.62.154.146
User agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2013-12-02 20:22:13 UTC
What's the question?
Comment 2 Ian 'Hixie' Hickson 2013-12-02 20:22:25 UTC
*** Bug 23937 has been marked as a duplicate of this bug. ***