Skip to content

Commit

Permalink
support ssl listen
Browse files Browse the repository at this point in the history
  • Loading branch information
millken committed Sep 29, 2018
1 parent dc1adc3 commit cd8e562
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Application/Swoole.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ public function build()
$swoole = $container->has('swoole') ? $container->get('swoole') : [];
$address = $swoole['server']['address'] ?? '127.0.0.1';
$port = $swoole['server']['port'] ?? $this->getRandomPort($address);
$sslAddress = $swoole['server']['ssl_address'] ?? '';
$sslPort = $swoole['server']['ssl_port'] ?? 443;
$options = $swoole['options'] ?? [];
$this->server = new SwooleHttpServer($address, $port, SWOOLE_PROCESS, SWOOLE_TCP);
if ($sslAddress) {
$this->server->addlistener($sslAddress, $sslPort, SWOOLE_TCP | SWOOLE_SSL);
}

$this->server->set($options);
$logger = $container->has('logger') ?
Expand Down

0 comments on commit cd8e562

Please sign in to comment.