Example #1
0
    }
    public function ECOU()
    {
        $this->SendSTART();
        $this->SendU($this->ReadU());
        $this->SendRETURN();
    }
    public function SETU()
    {
        $this->buf = $this->ReadU();
    }
    public function GETU()
    {
        $this->SendSTART();
        $this->SendU($this->buf);
        $this->SendRETURN();
        $this->buf = NULL;
    }
}
$ctx = FactoryNew('server', 'Server');
try {
    $ctx->LinkCreate($argv);
    $ctx->LogC("test", 1, "this is the log test\n");
    $ctx->ProcessEvent(MqS::WAIT_FOREVER);
} catch (Exception $e) {
    $ctx->ErrorSet($e);
}
$ctx->Exit();
?>

Example #2
0
#§  \file       theLink/example/php/MyServer.php
#§  \brief      \$Id$
#§
#§  (C) 2010 - NHI - #1 - Project - Group
#§
#§  \version    \$Rev$
#§  \author     EMail: aotto1968 at users.berlios.de
#§  \attention  this software has GPL permissions to copy
#§              please contact AUTHORS for additional information
#§
class MyServer extends MqS implements iServerSetup
{
    public function ServerSetup()
    {
        $this->ServiceCreate('HLWO', array(&$this, 'HLWO'));
    }
    public function HLWO()
    {
        $this->SendSTART();
        $this->SendC("Hello World");
        $this->SendRETURN();
    }
}
$srv = FactoryNew('MyServer');
try {
    $srv->LinkCreate($argv);
    $srv->ProcessEvent(MqS::WAIT_FOREVER);
} catch (Exception $ex) {
    $srv->ErrorSet($ex);
}
$srv->Exit();
Example #3
0
#§
class TestServer extends MqS implements iServerSetup
{
    public function ServerSetup()
    {
        $this->ServiceCreate('GTCX', array(&$this, 'GTCX'));
    }
    public function GTCX()
    {
        $this->SendSTART();
        $this->SendI($this->LinkGetCtxId());
        $this->SendC("+");
        if ($this->LinkIsParent()) {
            $this->SendI(-1);
        } else {
            $this->SendI($this->LinkGetParent()->LinkGetCtxId());
        }
        $this->SendC("+");
        $this->SendC($this->ConfigGetName());
        $this->SendC(":");
        $this->SendRETURN();
    }
}
$srv = FactoryNew('TestServer');
try {
    $srv->LinkCreate($argv);
    $srv->ProcessEvent(MqS::WAIT_FOREVER);
} catch (Exception $ex) {
    $srv->ErrorSet($ex);
}
$srv->Exit();
Example #4
0
#§  \file       theLink/example/php/mulserver.php
#§  \brief      \$Id$
#§
#§  (C) 2010 - NHI - #1 - Project - Group
#§
#§  \version    \$Rev$
#§  \author     EMail: aotto1968 at users.berlios.de
#§  \attention  this software has GPL permissions to copy
#§              please contact AUTHORS for additional information
#§
class MulServer extends MqS implements iServerSetup
{
    public function ServerSetup()
    {
        $this->ServiceCreate('MMUL', array(&$this, 'MMUL'));
    }
    public function MMUL()
    {
        $this->SendSTART();
        $this->SendD($this->ReadD() * $this->ReadD());
        $this->SendRETURN();
    }
}
$srv = FactoryNew('mulserver', 'MulServer');
try {
    $srv->LinkCreate($argv);
    $srv->ProcessEvent(MqS::WAIT_FOREVER);
} catch (Exception $ex) {
    $srv->ErrorSet($ex);
}
$srv->Exit();
Example #5
0
            $list[] = "<{$item}>";
        }
        $this->data[] = $list;
        $this->SendRETURN();
    }
    public function EOFcmd()
    {
        $ftr = $this->ServiceGetFilter();
        foreach ($this->data as $list) {
            $ftr->SendSTART();
            foreach ($list as $item) {
                $ftr->SendC($item);
            }
            $ftr->SendEND_AND_WAIT('+FTR');
        }
        $ftr->SendSTART();
        $ftr->SendEND_AND_WAIT('+EOF');
        $this->SendRETURN();
    }
}
$srv = FactoryNew('filter', 'Filter1');
try {
    $srv->LinkCreate($argv);
    $srv->ProcessEvent(MqS::WAIT_FOREVER);
} catch (Exception $ex) {
    $srv->ErrorSet($ex);
}
$srv->Exit();
?>

Example #6
0
#§  \brief      \$Id$
#§
#§  (C) 2010 - NHI - #1 - Project - Group
#§
#§  \version    \$Rev$
#§  \author     EMail: aotto1968 at users.berlios.de
#§  \attention  this software has GPL permissions to copy
#§              please contact AUTHORS for additional information
#§
class Filter3 extends MqS implements iServerSetup
{
    public function ServerSetup()
    {
        $ftr = $this->ServiceGetFilter();
        $this->ServiceProxy("+ALL");
        $this->ServiceProxy("+TRT");
        $ftr->ServiceProxy("+ALL");
        $ftr->ServiceProxy("+TRT");
    }
}
$srv = FactoryNew('Filter3');
try {
    $srv->LinkCreate($argv);
    $srv->ProcessEvent(MqS::WAIT_FOREVER);
} catch (Exception $ex) {
    $srv->ErrorSet($ex);
}
$srv->Exit();
?>