2.0.10 • Published 9 years ago

mesh-remote-bus v2.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

This is an adapter bus for remote protocols such as socket.io, websockets, pubnub, etc.

Installation: npm install mesh-remote-bus

Example:

import RemoteBus from 'mesh-remote-bus';
import { WrapBus } from 'mesh';
import createSocketIoClient from 'socket.io-client';

var client = createSocketIo('http://12.0.0.1:8080');

var adapter = {
  addListener(listener) {
    client.on('message', listener);
  },
  send(message) {
    client.send('message', message);
  }
};

var localBus = WrapBus.create(function() {
  return 'hello!';
});

var bus = RemoteBus.create(adapter, localBus);

bus.execute({ }).read().then(function({value}) {
  console.log(value);
})
2.0.10

9 years ago

2.0.9

9 years ago

2.0.8

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago