2017 © Pedro Peláez
 

library client

php client for UpSub. A High performance Pub/Sub messaging server for the Web & Cloud.

image

upsub/client

php client for UpSub. A High performance Pub/Sub messaging server for the Web & Cloud.

  • Thursday, March 15, 2018
  • by upsub
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

php client

Latest Stable Version Build Status, (*1)

This is the php client for UpSub, its communicating to the Dispatcher via the http protocol. This client is write only and can therefore not listen for message from the Dispatcher., (*2)

Only clients with subscription support can listen for message, see the JavaScript client., (*3)

Install

The client is published to packagist and can be installed with composer., (*4)

composer require upsub/client

Usage

<?php
use UpSub\Client;

$client = new Client('http://localhost:4400', [
  // options
]);

Options

  • name: string: Name the connection, useful for debugging.
  • appID: string: App identifier for the dispatcher authentication.
  • secret: string: Secret key for authentication.
  • timeout: int: If the http request exceeds the timeout then terminate the request, default is 5 seconds.

Create a channel

The best way to structure eventstreams is by scoping it in different channels., (*5)

<?php
// Single channel
$channel = $client->channel('channel');

// Multiple channels
$multiChannel = $client->channel('channel-1', 'channel-2');

Send message

Send message to the UpSub Dispatcher., (*6)

<?php
// Send message from the channel
$channel->send('event', [ 'key' => 'value' ]);

// Send message directly from client
$client->send('event', 'my message...');

License

Released under the MIT License, (*7)

The Versions

15/03 2018

dev-master

9999999-dev http://uptime.dk

php client for UpSub. A High performance Pub/Sub messaging server for the Web & Cloud.

  Sources   Download

MIT

The Requires

 

The Development Requires

client websocket message-bus real-time upsub

15/03 2018

v0.2.0

0.2.0.0 http://uptime.dk

php client for UpSub. A High performance Pub/Sub messaging server for the Web & Cloud.

  Sources   Download

MIT

The Requires

 

The Development Requires

client websocket message-bus real-time upsub

24/01 2018

v0.1.0

0.1.0.0 http://uptime.dk

php client for UpSub. A High performance Pub/Sub messaging server for the Web & Cloud.

  Sources   Download

MIT

The Requires

 

The Development Requires

client websocket message-bus real-time upsub