socket-utils
0.1.0 • Public • Published gaw-socket-utils
very simple utilities to get information from a socket.io (v1.0.0+) connection
Install
$ npm install --save socket-utils
Tests
Coverage
API
utils.socketInfo()
Params
Name |
Type |
Description |
socket |
socket.io.Socket |
A connected socket object |
Example
io.on('connection', function(socket) {
socket.on('info', function() {
var info = utils.socketInfo(this)
console.log(info)
})
})
Package Sidebar
Install
Weekly Downloads