예제 #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;
 }