Add example demonstrating a basic WebSocket protocol with message types
未关闭
docs
- 主要语言
- Go
- 星标
- 5.5k
- 派生
- 372
- PR 合并指标
- 30 天内没有已合并 PR
描述
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?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。