2017 © Pedro Peláez
 

library emessenger

Send messages to php process over protocols.

image

cursedcoder/emessenger

Send messages to php process over protocols.

  • Monday, April 18, 2016
  • by dark
  • Repository
  • 0 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

EMessenger

Send any messages across remote processes., (*1)

Available transports

  • Unix socket files (unix://tmp/log.sock)
  • More later: tcp, udp etc.

Examples

<?php

// logserver.php

use React\EventLoop\Factory as EventLoopFactory;
use EMessenger\Transport\UnixTransport;
use EMessenger\MessengerFactory;

$loop = EventLoopFactory::create();

$transport = new UnixTransport($loop, 'unix://tmp/log.sock');
$messenger = MessengerFactory::server($transport);

$messenger->send('debug', 'This is a test message.');

<?php

// logwriter.php

use React\EventLoop\Factory as EventLoopFactory;
use EMessenger\Transport\UnixTransport;
use EMessenger\MessengerFactory;

$loop = EventLoopFactory::create();

$transport = new UnixTransport($loop, 'unix://tmp/log.sock');
$messenger = MessengerFactory::client($transport);

$messenger->on('debug', function($debug) {
    echo 'Received debug message: ' . $debug;
});

The Versions

18/04 2016

dev-master

9999999-dev https://github.com/cursedcoder/emessenger

Send messages to php process over protocols.

  Sources   Download

MIT

The Requires

 

The Development Requires

async non-blocking react socket unix ipc

13/04 2016

0.1

0.1.0.0 https://github.com/cursedcoder/emessenger

Send messages to php process over protocols.

  Sources   Download

MIT

The Requires

 

The Development Requires

async non-blocking react socket unix ipc