ftp_sockets::_connect() –

You appear to be a bot. Output may be restricted

Description

Usage

ftp_sockets::_connect( $host, $port );

Parameters

$host
( mixed ) required
$port
( mixed ) required

Returns

void

Source

File name: wordpress/wp-admin/includes/class-ftp-sockets.php
Lines:

1 to 16 of 16
  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->ftp_sockets::_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;
  }
 

 View on GitHub View on Trac