Skip to content

Commit 3996a6c

Browse files
committed
expose mode
1 parent 2f1b5ab commit 3996a6c

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/Http/Adapter/Swoole/Server.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ 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 = [], ?Container $container = null, int $mode = SWOOLE_PROCESS)
1919
{
20-
$this->server = new SwooleServer($host, (int) $port);
21-
$this->server->set(\array_merge($settings, [
20+
$this->server = new SwooleServer($host, (int) $port, $mode);
21+
$this->server->set(\array_merge([
2222
'open_http2_protocol' => true,
23-
'dispatch_mode' => 2,
24-
]));
23+
], $settings));
2524
$this->container = $container ?? new Container();
2625
}
2726

0 commit comments

Comments
 (0)