2.0.10 • Published 8 years ago

mesh-remote-bus v2.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
8 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

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago