Exemplo n.º 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();
 }
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionCode 1
  */
 public function testNameNotExistsWithSetter()
 {
     $opt = new SwooleServerOptions();
     $opt->setOption('foo', 'bar');
 }