$this->
SendMSG("Timeout ".
$this->_timeout
);
if($this->_connected
) if(!
$this->
_settimeout($this->_ftp_control_sock
)) return FALSE;
return TRUE;
} function connect($server=NULL
) { if(!
empty($server)) { if(!
$this->
SetServer($server)) return false;
} if($this->_ready
) return true;
$this->
SendMsg('Local OS : '.
$this->OS_FullName
[$this->OS_local
]);
if(!
($this->_ftp_control_sock =
$this->
_connect($this->_host,
$this->_port
))) { $this->
SendMSG("Error : Cannot connect to remote host \"".
$this->_fullhost." :".
$this->_port."\""
);
return FALSE;
} $this->
SendMSG("Connected to remote host \"".
$this->_fullhost.":".
$this->_port."\". Waiting for greeting."
);
do { if(!
$this->
_readmsg()) return FALSE;
if(!
$this->
_checkCode()) return FALSE;
$this->_lastaction=
time();
} while($this->_code<200
);
$this->_ready=true;