@remixproject/plugin-ws
This library is a connector that connects a node server to using the `ws` library to the engine.
Last updated 9 days ago by grandschtroumpf .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @remixproject/plugin-ws 
SYNC missed versions from official npm registry.

Plugin ws

This library is a connector that connects a node server to using the ws library to the engine.

If you do not expose any API you can create an instance like this :

const wss = new WebSocket.Server({ port: 8080 });
wss.on('connection', (ws) => {
  const client = createClient(ws)
})

If you need to expose an API to other plugin you need to extends the class:

class MyPlugin extends PluginClient {
 methods = ['hello']
 hello() {
  console.log('Hello World')
 }
}
const wss = new WebSocket.Server({ port: 8080 });
wss.on('connection', (ws) => {
 const client = createClient(ws, new MyPlugin())
})

Current Tags

  • 0.3.3                                ...           latest (9 days ago)
  • 0.3.3-alpha                                ...           next (9 days ago)

32 Versions

  • 0.3.3                                ...           9 days ago
  • 0.3.3-alpha                                ...           9 days ago
  • 0.3.2                                ...           16 days ago
  • 0.3.1                                ...           23 days ago
  • 0.3.0                                ...           a month ago
  • 0.3.0-beta.14                                ...           a month ago
  • 0.3.0-beta.13                                ...           a month ago
  • 0.3.0-beta.12                                ...           2 months ago
  • 0.3.0-beta.11                                ...           2 months ago
  • 0.3.0-beta.10                                ...           2 months ago
  • 0.3.0-beta.9                                ...           2 months ago
  • 0.3.0-beta.8                                ...           2 months ago
  • 0.3.0-beta.7                                ...           2 months ago
  • 0.3.0-beta.6                                ...           2 months ago
  • 0.3.0-beta.5                                ...           3 months ago
  • 0.3.0-beta.4                                ...           3 months ago
  • 0.3.0-beta.3                                ...           3 months ago
  • 0.3.0-beta.2                                ...           3 months ago
  • 0.3.0-alpha.4                                ...           4 months ago
  • 0.3.0-alpha.3                                ...           4 months ago
  • 0.3.0-alpha.2                                ...           4 months ago
  • 0.2.1                                ...           4 months ago
  • 0.3.0-alpha.1                                ...           6 months ago
  • 0.2.0-alpha.5                                ...           9 months ago
  • 0.2.0-alpha.1                                ...           10 months ago
  • 0.0.3                                ...           a year ago
  • 0.0.2-alpha.4                                ...           a year ago
  • 0.0.2-alpha.3                                ...           a year ago
  • 0.0.2-alpha.2                                ...           a year ago
  • 0.0.2-alpha.1                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Downloads
Today 0
This Week 13
This Month 255
Last Day 8
Last Week 71
Last Month 398
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |