red-rings-socket.io
A [red-rings](https://gitlab.com/shimaore/red-rings/) component supporting Socket.io.
Last updated a year ago by shimaore .
Unlicense · Repository · Original npm · Tarball · package.json
$ cnpm install red-rings-socket.io 
SYNC missed versions from official npm registry.

A red-rings component supporting Socket.io.

The following modules are provided:

  • client — a frontend client (usable e.g. in a UI)
  • frontend — a frontend plugin for abrasive-ducks

No backend is provided.

Client

const socket = io('http://localhost')
const client = new RedRingSocketioClient(socket)

socket.on( 'ready', () =>
  client
  .receive("legacy-number:${number}")
  .map( (msg) => {
    switch msg.get 'state'
      when 'ingress-call'
        msg.getIn(['value','source'])
      when 'call-attempt'
        msg.getIn(['value','destination'])
      when 'end'
        null
  })
  .forEach( (number) => … )
})

client.receive(message,limit = most.never()) returns a Most.js stream of Immutable.js messages. The stream stops when limit emits an event.

client.create(doc)

client.update(id,rev,doc,operations)

client.delete(id,rev)

(client.notify(key,id,value,doc))

Current Tags

  • 2.0.0                                ...           latest (a year ago)

13 Versions

  • 2.0.0                                ...           a year ago
  • 1.4.2                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 13
This Month 14
Last Day 0
Last Week 1
Last Month 2
Dependencies (5)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |