New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

websocket-json-stream

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-json-stream

Expose WebSockets with JSON as an object stream

0.0.2
Version published
Weekly downloads
1.4K
-2.44%
Maintainers
1
Weekly downloads
 
Created

WebSocketJSONStream

Expose a WebSocket connection on the server with JSON-encoded strings as a stream.

Usage

var WebSocket = require('ws');
var wss = new WebSocket.Server({server: server});
var WebSocketJSONStream = require('websocket-json-stream');

wss.on('connection', function(ws, req) {
  var stream = new WebSocketJSONStream(ws)

  // ...

});

FAQs

Package last updated on 16 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts