Beispiel #1
0
<?php

require_once 'stdin.php';
require_once 'noSQLite.php';
$stdin = new stdin();
$stdin->service = 'noSQLi';
$daemon = new daemon($stdin);
$daemon->setService($stdin->service);
$daemon->run();
class listener
{
    public $socket;
    public $method;
    public $arguments = array();
    public $meta = array();
    public $header;
    const HEADER_LENGTH = 2;
    const ARGUMENT_HEADER_LENGTH = 4;
    const RESPONSE_LENGTH = 4;
    const SIGNAL_ACK = 'ACK';
    const SIGNAL_ERR = 'ERROR';
    public function __construct($socket)
    {
        $this->socket = $socket;
    }
    public function metaUnpackString($arguments)
    {
        $unpackString = 'Lmethod/';
        for ($i = 0, $c = $arguments; $i < $c; $i++) {
            $unpackString .= 'Largument' . ($i + 1) . '/';
        }