Laravoole\Wrapper\SwooleHttpWrapper::start PHP Method

start() public method

public start ( )
    public function start()
    {
        if (!empty($this->handler_config)) {
            $this->server->set($this->handler_config);
        }
        parent::start();
    }

Usage Example

Ejemplo n.º 1
0
 public function start()
 {
     if (!empty($this->handler_config)) {
         $this->server->set($this->handler_config);
     }
     $this->defaultProtocol = $this->wrapper_config['websocket_default_protocol'];
     static::registerCodec($this->wrapper_config['websocket_protocols']);
     $this->callbacks = array_merge(['HandShake' => [$this, 'onHandShake'], 'Message' => [$this, 'onMessage'], 'Close' => [$this, 'onClose'], 'Task' => [static::class, 'onTask'], 'Finish' => [static::class, 'onFinish']], $this->callbacks);
     parent::start();
 }