FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add example demonstrating a basic WebSocket protocol with message types · Issue #217 · coder/websocket · GitHub

Add example demonstrating a basic WebSocket protocol with message types #217

Description

In HTML5 websockt or socket.io, you can consume messages just with the following lines of code:

var io = require('socket.io-client');
var socket = io('http://localhost:6001');

socket.on('connect', function () {
	console.log('connected');
});

socket.on('StockTicker', function (data) {
	console.log(data);
});

socket.on('StockBidAsk', function (data) {
	console.log(data);
});

socket.on('Stock', function (data) {
	console.log(data);
});

How to achieve the example above in this library?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


Back | FazBrowse Home | New Git URL