if ($this->transport !== 'unix') {
// Open socket connection asynchronously.
if ($this->_contextOption) {
$context = stream_context_create($this->_contextOption);
$this->_socket = stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",
$errno, $errstr, 0, STREAM_CLIENT_ASYNC_CONNECT, $context);
} else {
$this->_socket = stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",
$errno, $errstr, 0, STREAM_CLIENT_ASYNC_CONNECT);
}
} else {
var_dump(211221122121);
$this->_socket = stream_socket_client("{$this->transport}://{$this->_remoteAddress}", $errno, $errstr, 0,
STREAM_CLIENT_ASYNC_CONNECT);
}
我想問一下官方,WSS是用TCP連接嗎?
調(diào)試輸出執(zhí)行了這一句
$this->_socket = stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",
$errno, $errstr, 0, STREAM_CLIENT_ASYNC_CONNECT);
$this->transport =="ssl"