WordPress at Your Fingertips
function is not described

ftp_sockets::_connect() public WP 1.0

{} It's a method of the class: ftp_sockets{}

No Hooks.

Return

null. Nothing.

Usage

$ftp_sockets = new ftp_sockets();
$ftp_sockets->_connect( $host, $port );
$host (required)
-
$port (required)
-

Code of ftp_sockets::_connect() WP 5.8.2

function _connect($host, $port) {
	$this->SendMSG("Creating socket");
	if(!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) {
		$this->PushError('_connect','socket create failed',socket_strerror(socket_last_error($sock)));
		return FALSE;
	}
	if(!$this->_settimeout($sock)) return FALSE;
	$this->SendMSG("Connecting to \"".$host.":".$port."\"");
	if (!($res = @socket_connect($sock, $host, $port))) {
		$this->PushError('_connect','socket connect failed',socket_strerror(socket_last_error($sock)));
		@socket_close($sock);
		return FALSE;
	}
	$this->_connected=true;
	return $sock;
}