コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function start(ServerContextInterface $context, RequestHandlerInterface $requestHandler)
 {
     $this->server = new \swoole_http_server($context->getListenAddress(), $context->getListenPort(), \SWOOLE_BASE);
     if (null !== $this->serverOptions) {
         $this->server->set($this->serverOptions->getOptions());
     }
     $this->server->on('request', $this->createRequestHandler($requestHandler));
     $this->server->start();
 }
コード例 #2
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionCode 1
  */
 public function testNameNotExistsWithSetter()
 {
     $opt = new SwooleServerOptions();
     $opt->setOption('foo', 'bar');
 }