Skip to content

Commit 81ab4ce

Browse files
authored
Merge pull request #5 from daydaygo/master
add http2
2 parents c27b40a + 614629a commit 81ab4ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Http/HttpServer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class HttpServer extends AbstractServer
2828
*/
2929
public function start()
3030
{
31+
if (!empty($this->setting['open_http2_protocol'])) {
32+
$this->httpSetting['type'] = SWOOLE_SOCK_TCP|SWOOLE_SSL;
33+
}
3134
$this->server = new Server($this->httpSetting['host'], $this->httpSetting['port'], $this->httpSetting['mode'], $this->httpSetting['type']);
3235

3336
// Bind event callback

0 commit comments

Comments
 (0)