protected function send($data)
    {
        $this->debug("Send: $data");

        $result = $this->socket->write($data);
        if (!$result || PEAR::isError($result)) {
            $msg = $result ? $result->getMessage() : "unknown error";
            return PEAR::raiseError("Failed to write to socket: $msg");
        }

        return $result;
    }
protected function send($data)
    {
        $this->debug("Send: $data");

        $result = $this->socket->write($data);
        if (!$result || PEAR::isError($result)) {
            $msg = $result ? $result->getMessage() : "unknown error";
            return PEAR::raiseError("Failed to write to socket: $msg");
        }

        return $result;
    }
protected function send ( $ data ) { $ this -> debug ( "Send: $data" ) ; $ result = $ this -> socket -> write ( $ data ) ; if ( ! $ result || PEAR :: isError ( $ result ) ) { $ msg = $ result ? $ result -> getMessage ( ) : "unknown error" ; return PEAR :: raiseError ( "Failed to write to socket: $msg" ) ; } return $ result ; }
Send the given string of data to the server.

@param string $data The string of data to send.

@return mixed The number of bytes that were actually written,
or a PEAR_Error object on failure.

@since 1.1.0
Send the given string of data to the server .