Swoole\Network\Server::__construct PHP Method

__construct() public method

public __construct ( $host, $port, $ssl = false )
    function __construct($host, $port, $ssl = false)
    {
        $flag = $ssl ? SWOOLE_SOCK_TCP | SWOOLE_SSL : SWOOLE_SOCK_TCP;
        if (!empty(self::$options['base'])) {
            self::$swooleMode = SWOOLE_BASE;
        } elseif (extension_loaded('swoole')) {
            self::$swooleMode = SWOOLE_PROCESS;
        }
        if (self::$useSwooleHttpServer) {
            $this->sw = new \swoole_http_server($host, $port, self::$swooleMode, $flag);
        } else {
            $this->sw = new \swoole_server($host, $port, self::$swooleMode, $flag);
        }
        $this->host = $host;
        $this->port = $port;
        Swoole\Error::$stop = false;
        Swoole\JS::$return = true;
        $this->runtimeSetting = array('backlog' => 128);
    }