WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Snoopy::_connect() public WP 1.0

{} Это метод класса: Snoopy{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$Snoopy = new Snoopy();
$Snoopy->_connect( $fp );

Код Snoopy::_connect() WP 5.5.3

<?php
function _connect(&$fp)
{
	if(!empty($this->proxy_host) && !empty($this->proxy_port))
		{
			$this->_isproxy = true;

			$host = $this->proxy_host;
			$port = $this->proxy_port;
		}
	else
	{
		$host = $this->host;
		$port = $this->port;
	}

	$this->status = 0;

	if($fp = fsockopen(
				$host,
				$port,
				$errno,
				$errstr,
				$this->_fp_timeout
				))
	{
		// socket connection succeeded

		return true;
	}
	else
	{
		// socket connection failed
		$this->status = $errno;
		switch($errno)
		{
			case -3:
				$this->error="socket creation failed (-3)";
			case -4:
				$this->error="dns lookup failure (-4)";
			case -5:
				$this->error="connection refused or timed out (-5)";
			default:
				$this->error="connection failed (".$errno.")";
		}
		return false;
	}
}