2017 © Pedro Peláez
 

library thruway-client

RxPHP WAMP client

image

rx/thruway-client

RxPHP WAMP client

  • Wednesday, February 14, 2018
  • by davidwdan
  • Repository
  • 3 Watchers
  • 5 Stars
  • 2,202 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 23 Versions
  • 51 % Grown

The README.md

RxPHP WAMP Client

This project is a WAMP v2 client written in PHP that uses RxPHP Observables instead of promises and event emitters., (*1)

If you don't know what WAMP is, you should read up on it., (*2)

If you don't know what RxPHP or ReactiveExtensions is, you're missing out..., (*3)

Installation

composer require rx/thruway-client

Usage

use Rx\Observable;
use Rx\Thruway\Client;

require __DIR__ . '/vendor/autoload.php';

$wamp = new Client('ws://127.0.0.1:9090', 'realm1');

Call

$wamp->call('add.rpc', [1, 2])
    ->map(function (Thruway\Message\ResultMessage $r) {
        return $r->getArguments()[0];
    })
    ->subscribe(function ($r) {
        echo $r;
    });

Register

$wamp->register('add.rpc', function ($a, $b) { return $a + $b; })->subscribe();

If the Registration Handler throws an exception, thruway.error.invocation_exception is returned to the caller. If you would like to allow more specific error messages, you must throw a WampErrorException or, if using observable sequences that are returned from the RPC, you can onError a WampErrorException., (*4)

Publish to topic

$wamp->publish('example.topic', 'some value');
$wamp->publish('example.topic', Observable::interval(1000)); // you can also publish an observable

Subscribe to topic

$wamp->topic('example.topic')
    ->map(function(Thruway\Message\EventMessage $m) {
        return $m->getArguments()[0];
    })
    ->subscribe(function ($v) { echo $v; });

The Versions

14/02 2018

dev-master

9999999-dev

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

19/01 2018

3.3.0

3.3.0.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

07/12 2017

3.2.1

3.2.1.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

28/11 2017

3.2.0

3.2.0.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

03/11 2017

dev-rxwebsocket2

dev-rxwebsocket2

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

31/10 2017

3.1.1

3.1.1.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

31/10 2017

dev-keepalive-ints

dev-keepalive-ints

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

26/10 2017

3.1.0

3.1.0.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

25/07 2017

3.0.2

3.0.2.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

23/06 2017

3.0.1

3.0.1.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

09/05 2017

3.0.0

3.0.0.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

09/05 2017

2.0.8

2.0.8.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

26/04 2017

2.0.7

2.0.7.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

04/04 2017

2.0.6

2.0.6.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

03/04 2017

dev-rxWebsocket

dev-rxWebsocket

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

01/04 2017

2.0.5

2.0.5.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

28/03 2017

2.0.4

2.0.4.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

21/03 2017

2.0.3

2.0.3.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

14/03 2017

2.0.2

2.0.2.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

10/01 2017

2.0.1

2.0.1.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

23/12 2016

2.0.0

2.0.0.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

05/12 2016

0.0.2

0.0.2.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway

21/10 2016

0.0.1

0.0.1.0

RxPHP WAMP client

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

wamp rxphp reactivex rx.php thruway