2017 © Pedro Peláez
 

library multi-process-server

Runs a multi threaded server.

image

qxsch/multi-process-server

Runs a multi threaded server.

  • Monday, March 27, 2017
  • by qxsch
  • Repository
  • 3 Watchers
  • 3 Stars
  • 61 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

MultiProcessServer

Project Status, (*1)

Latest Stable Version Total Downloads License, (*2)

A multithreaded server for PHP, (*3)

The TCPServer class provides a very simple interface to communicate with a client. You can control how many processes should be allowed to run concurrently. The TCPServer can be fully observed., (*4)

The TCPClient class provides a very simple interface to communicate with a server., (*5)

You can send any data between the client and the server that can be serialized., (*6)

TLS Encryption with server and client certificate is supported (mutual authentication)., (*7)

A simple example

Server Code:, (*8)

<?php

$server = new \QXS\MultiProcessServer\TCPServer(12345);  // setup the server for 127.0.0.1 on port 12345
// UNCOMMENT THE NEXT LINE TO ADD IMPERSONATION
//$server->runAsUser("nobody");
$server->attach(new \QXS\MultiProcessServer\Observers\EchoObserver());
$server->create(new \QXS\MultiProcessServer\ClosureServerWorker(
    /**
     * @param \QXS\MultiProcessServer\SimpleSocket $serverSocket the socket to communicate with the client
     */
    function(\QXS\MultiProcessServer\SimpleSocket $serverSocket) {
        // receive data and send it back
        $data=$serverSocket->receive();
        echo "$data\n";
        $serverSocket->send($data);
    }
));

Client Code:, (*9)

<?php

$client = new \QXS\MultiProcessServer\TCPClient(12345);  // connect to 127.0.0.1 on port 12345
$client->send("hi");

echo $client->receive() ."\n";

The Versions

27/03 2017

dev-master

9999999-dev https://github.com/qxsch/MultiProcessServer

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • ext-pcntl *
  • ext-posix *
  • ext-sockets *
  • php >=5.3.2

 

The Development Requires

by Marco Weber

server parallel fork socket

23/03 2017

v1.0.1

1.0.1.0 https://github.com/qxsch/MultiProcessServer

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.2
  • ext-pcntl *
  • ext-posix *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket

30/10 2014

v0.7.3

0.7.3.0 https://github.com/qxsch/MultiProcessServer

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.2
  • ext-pcntl *
  • ext-posix *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket

29/10 2014

v0.7.2

0.7.2.0 https://github.com/qxsch/MultiProcessServer

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.0
  • ext-pcntl *
  • ext-posix *
  • ext-sysvsem *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket

27/10 2014

0.7.1

0.7.1.0 https://github.com/qxsch/MultiProcessServer

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.0
  • ext-pcntl *
  • ext-posix *
  • ext-sysvsem *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket

25/10 2014

0.6.0

0.6.0.0 https://github.com/qxsch/WorkerPool

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.0
  • ext-pcntl *
  • ext-posix *
  • ext-sysvsem *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket

20/10 2014

0.5.1

0.5.1.0 https://github.com/qxsch/WorkerPool

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.0
  • ext-pcntl *
  • ext-posix *
  • ext-sysvsem *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket

20/10 2014

v0.5

0.5.0.0 https://github.com/qxsch/WorkerPool

Runs a multi threaded server.

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.0
  • ext-pcntl *
  • ext-posix *
  • ext-sysvsem *
  • ext-sockets *

 

The Development Requires

by Marco Weber

server parallel fork socket