@patternplate/websocket-client

3.2.5 • Public • Published

Documentation and development interface for component libraries

@patternplate/websocket-client

  • Framework independent
  • Bring design docs to live with real components
  • Powerful search and meta data system

This is the contributor documentation for @patternplate/websocket-client For user docs see patternplate.github.io

About @patternplate/websocket-client

Create a ws:// connection that reconnects when disconnected.

Usage

const { WebSocketClient } = require("@patternplate/websocket-client");

const ws = new WebSocketClient({
  src: `ws://localhost:1337/api/`,
  reconnect: true,
  interval: 1000
});

ws.open();
ws.onMessage(message => console.log(message));

License

Copyright by SinnerSchrader. All @patternplate packages are released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @patternplate/websocket-client

Weekly Downloads

4

Version

3.2.5

License

MIT

Unpacked Size

9.67 kB

Total Files

6

Last publish

Collaborators

  • kotzendekrabbe
  • lkuechler
  • rongae
  • marionebl