芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/joolsmen.com/chat/vendor/react/socket/src/HappyEyeBallsConnector.php
loop = $loop; $this->connector = $connector; $this->resolver = $resolver; } public function connect($uri) { if (\strpos($uri, '://') === false) { $parts = \parse_url('tcp://' . $uri); unset($parts['scheme']); } else { $parts = \parse_url($uri); } if (!$parts || !isset($parts['host'])) { return Promise\reject(new \InvalidArgumentException('Given URI "' . $uri . '" is invalid')); } $host = \trim($parts['host'], '[]'); // skip DNS lookup / URI manipulation if this URI already contains an IP if (false !== \filter_var($host, \FILTER_VALIDATE_IP)) { return $this->connector->connect($uri); } $builder = new HappyEyeBallsConnectionBuilder( $this->loop, $this->connector, $this->resolver, $uri, $host, $parts ); return $builder->connect(); } }