2.0.0 • Published 6 years ago

red-rings-socket.io v2.0.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
6 years ago

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))

2.0.0

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago