Examples of rpos()


Examples of org.apache.sshd.common.util.Buffer.rpos()

        if (receiveBuffer.available() > 0) {
            receiveBuffer.putBuffer(incoming);
            incoming = receiveBuffer;
        }
        // Process commands
        int rpos = incoming.rpos();
        while (receive(incoming));
        int read = incoming.rpos() - rpos;
        // Compact and add remaining data
        receiveBuffer.compact();
        if (receiveBuffer != incoming && incoming.available() > 0) {
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

            incoming = receiveBuffer;
        }
        // Process commands
        int rpos = incoming.rpos();
        while (receive(incoming));
        int read = incoming.rpos() - rpos;
        // Compact and add remaining data
        receiveBuffer.compact();
        if (receiveBuffer != incoming && incoming.available() > 0) {
            receiveBuffer.putBuffer(incoming);
        }
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

     * Process an SFTP packet
     */
    protected void process(Buffer incoming) throws IOException {
        Buffer buffer = new Buffer();
        buffer.putBuffer(incoming);
        buffer.rpos(5);
        int id = buffer.getInt();
        buffer.rpos(0);
        synchronized (messages) {
            messages.put(id, buffer);
            messages.notifyAll();
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

    protected void process(Buffer incoming) throws IOException {
        Buffer buffer = new Buffer();
        buffer.putBuffer(incoming);
        buffer.rpos(5);
        int id = buffer.getInt();
        buffer.rpos(0);
        synchronized (messages) {
            messages.put(id, buffer);
            messages.notifyAll();
        }
    }
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

        if (buffer.available() < len + 4) {
            return;
        }
        Buffer rep = new Buffer();
        rep.putInt(0);
        rep.rpos(rep.wpos());
        try {
            process(new Buffer(buffer.getBytes()), rep);
        } catch (Exception e) {
            rep.clear();
            rep.putInt(0);
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

        try {
            process(new Buffer(buffer.getBytes()), rep);
        } catch (Exception e) {
            rep.clear();
            rep.putInt(0);
            rep.rpos(rep.wpos());
            rep.putInt(1);
            rep.putByte(SSH2_AGENT_FAILURE);
        }
        reply(prepare(rep));
    }
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

                int flags = req.getInt();
                Buffer sig = new Buffer();
                sig.putString(key instanceof RSAPublicKey ? KeyPairProvider.SSH_RSA : KeyPairProvider.SSH_DSS);
                sig.putBytes(agent.sign(key, data));
                rep.putByte(SSH2_AGENT_SIGN_RESPONSE);
                rep.putBytes(sig.array(), sig.rpos(), sig.available());
                break;
            }
            case SSH2_AGENTC_ADD_IDENTITY:
            {
                agent.addIdentity(req.getKeyPair(), req.getString());
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

            if (outMac != null) {
                len += outMac.getBlockSize();
            }
            buffer = new Buffer(new byte[Math.max(len, Buffer.DEFAULT_SIZE)], false);
        }
        buffer.rpos(5);
        buffer.wpos(5);
        buffer.putByte(cmd.toByte());
        return buffer;
    }
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

            if (outMac != null) {
                len += outMac.getBlockSize();
            }
            buffer = new Buffer(new byte[Math.max(len, Buffer.DEFAULT_SIZE)], false);
        }
        buffer.rpos(5);
        buffer.wpos(5);
        buffer.putByte(cmd.toByte());
        return buffer;
    }
View Full Code Here

Examples of org.apache.sshd.common.util.Buffer.rpos()

     * Process an SFTP packet
     */
    protected void process(Buffer incoming) throws IOException {
        Buffer buffer = new Buffer();
        buffer.putBuffer(incoming);
        buffer.rpos(5);
        int id = buffer.getInt();
        buffer.rpos(0);
        synchronized (messages) {
            messages.put(id, buffer);
            messages.notifyAll();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.