[ 'local_cert' => $argv[2] ?? __DIR__ . '/localhost.pem' ] ]); $http->listen($socket); $socket->on('error', function (Exception $e) { echo 'Error: ' . $e->getMessage() . PHP_EOL; }); echo 'Listening on ' . str_replace('tls:', 'https:', $socket->getAddress()) . PHP_EOL;