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连接吗?
调试输出执行了这一句
$this->_socket = stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",
$errno, $errstr, 0, STREAM_CLIENT_ASYNC_CONNECT);
$this->transport =="ssl"
WSS也是基于TCP的