2017 © Pedro PelĂĄez
 

library socket-react

Binding for raw sockets (ext-sockets) in reactphp

image

clue/socket-react

Binding for raw sockets (ext-sockets) in reactphp

  • Monday, March 9, 2015
  • by clue
  • Repository
  • 1 Watchers
  • 17 Stars
  • 958 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

clue/socket-react Build Status

Binding for raw sockets (ext-sockets) in React PHP., (*1)

Quickstart example

Once installed, you can use the following example to send UDP broadcast datagrams:, (*2)

$loop = React\EventLoop\Factory::create();

$factory = new Socket\React\Datagram\Factory($loop);

$promise = $factory->createClient('udp://localhost:1337', array('broadcast' => true));
$promise->then(function (Socket\React\Datagram\Socket $socket) {
    $socket->send('test');

    $socket->on('message', function($data, $peer) {
        var_dump('Received', $data, 'from', $peer);
    });
});

$loop->run();

See also the examples., (*3)

Install

The recommended way to install this library is through composer. New to composer?, (*4)

{
    "require": {
        "clue/socket-react": "~0.3.0"
    }
}

Tests

To run the test suite, you need PHPUnit. Go to the project root and run:, (*5)

$ phpunit tests

Note: The test suite contains tests for ICMP sockets which require root access on unix/linux systems. Therefor some tests will be skipped unless you run sudo phpunit tests to execte the full test suite., (*6)

License

MIT, (*7)

The Versions

09/03 2015

dev-master

9999999-dev https://github.com/clue/php-socket-react

Binding for raw sockets (ext-sockets) in reactphp

  Sources   Download

MIT

The Requires

 

by Christian LĂŒck

async react sockets low-level ext-sockets

25/10 2014

v0.3.0

0.3.0.0 https://github.com/clue/php-socket-react

Binding for raw sockets (ext-sockets) in reactphp

  Sources   Download

MIT

The Requires

 

by Christian LĂŒck

async react sockets low-level ext-sockets

10/05 2014
04/03 2014

v0.2.1

0.2.1.0 https://github.com/clue/socket-react

Binding for raw sockets (ext-sockets) in reactphp

  Sources   Download

MIT

The Requires

 

by Christian LĂŒck

async react sockets low-level ext-sockets

04/03 2014

v0.2.0

0.2.0.0 https://github.com/clue/socket-react

Binding for raw sockets (ext-sockets) in reactphp

  Sources   Download

MIT

The Requires

 

by Christian LĂŒck

async react sockets low-level ext-sockets