Skip to content

Commit 8420a83

Browse files
committed
expose mode
1 parent 2f1b5ab commit 8420a83

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/Http/Adapter/Swoole/Server.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ class Server extends Adapter
1515
protected const REQUEST_CONTAINER_CONTEXT_KEY = '__utopia_http_request_container';
1616
protected Container $container;
1717

18-
public function __construct(string $host, ?string $port = null, array $settings = [], ?Container $container = null)
18+
public function __construct(string $host, ?string $port = null, array $settings = [], int $mode = SWOOLE_PROCESS, ?Container $container = null)
1919
{
20-
$this->server = new SwooleServer($host, (int) $port);
21-
$this->server->set(\array_merge($settings, [
22-
'open_http2_protocol' => true,
23-
'dispatch_mode' => 2,
24-
]));
20+
$this->server = new SwooleServer($host, (int) $port, $mode);
21+
$this->server->set($settings);
2522
$this->container = $container ?? new Container();
2623
}
2724

0 commit comments

Comments
 (0)