WordPress at Your Fingertips
function is not described

ftp_sockets::_readmsg() 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->_readmsg( $fnction );
$fnction **
-
Default: "_readmsg"

Code of ftp_sockets::_readmsg() WP 5.8.2

function _readmsg($fnction="_readmsg"){
	if(!$this->_connected) {
		$this->PushError($fnction,'Connect first');
		return FALSE;
	}
	$result=true;
	$this->_message="";
	$this->_code=0;
	$go=true;
	do {
		$tmp=@socket_read($this->_ftp_control_sock, 4096, PHP_BINARY_READ);
		if($tmp===false) {
			$go=$result=false;
			$this->PushError($fnction,'Read failed', socket_strerror(socket_last_error($this->_ftp_control_sock)));
		} else {
			$this->_message.=$tmp;
			$go = !preg_match("/^([0-9]{3})(-.+\\1)? [^".CRLF."]+".CRLF."$/Us", $this->_message, $regs);
		}
	} while($go);
	if($this->LocalEcho) echo "GET < ".rtrim($this->_message, CRLF).CRLF;
	$this->_code=(int)$regs[1];
	return $result;
}