コード例 #1
0
ファイル: demo.php プロジェクト: mufuphlex/cplt
function getContainerDaemon($container, $port)
{
    $socketListener = new SocketListener('127.0.0.1', $port);
    $inputProcessor = new SocketInputProcessor($container);
    $socketListener->setInputProcessor($inputProcessor);
    return new SocketDaemon($socketListener);
}
コード例 #2
0
ファイル: Factory.php プロジェクト: mufuphlex/cplt
 /**
  * @param ContainerInterface $container
  * @param $port
  * @return SocketListener
  */
 private static function makeSocketListener(ContainerInterface $container, $port)
 {
     $socketListener = new SocketListener('127.0.0.1', $port);
     $inputProcessor = new SocketInputProcessor($container);
     $socketListener->setInputProcessor($inputProcessor);
     return $socketListener;
 }