swoole_http2_client->__construct
构造方法,与swoole_http_client
的构造方法参数完全一致,共接受3个参数。
function swoole_http2_client->__construct($host, $port, $ssl = false)
$host
服务器的地址,如果未设置host
头,将自动使用$host
参数作为默认的host
头$port
端口号,SSL一般为443,非SSL一般为80$ssl
是否启用SSL加密,需要依赖openssl