Package streamer

Examples of streamer.ByteBuffer.writeByte()


    private ByteBuffer generateNegotiateMessage() {
        ByteBuffer buf = new ByteBuffer(1024);

        // Signature
        buf.writeString("NTLMSSP", RdpConstants.CHARSET_8);
        buf.writeByte(0);

        // Message type
        buf.writeIntLE(NtlmConstants.NEGOTIATE);

        buf.writeIntLE(clientConfigFlags.value); // Flags
View Full Code Here


        // Get mouse event
        MouseOrder order = (MouseOrder)buf.getOrder();

        ByteBuffer outBuf = new ByteBuffer(6);

        outBuf.writeByte(RfbConstants.CLIENT_POINTER_EVENT);

        int buttonMask = mapAwtModifiersToVncButtonMask(order.event.getModifiersEx());
        outBuf.writeByte(buttonMask);
        outBuf.writeShort(order.event.getX());
        outBuf.writeShort(order.event.getY());
View Full Code Here

        ByteBuffer outBuf = new ByteBuffer(6);

        outBuf.writeByte(RfbConstants.CLIENT_POINTER_EVENT);

        int buttonMask = mapAwtModifiersToVncButtonMask(order.event.getModifiersEx());
        outBuf.writeByte(buttonMask);
        outBuf.writeShort(order.event.getX());
        outBuf.writeShort(order.event.getY());

        pushDataToAllOuts(outBuf);
    }
View Full Code Here

        KeyOrder order = (KeyOrder)buf.getOrder();
        buf.unref();

        ByteBuffer outBuf = new ByteBuffer(8);
        outBuf.writeByte(RfbConstants.CLIENT_KEYBOARD_EVENT);

        outBuf.writeByte((order.pressed) ? RfbConstants.KEY_DOWN : RfbConstants.KEY_UP);
        outBuf.writeShort(0); // padding
        outBuf.writeInt(map_en_us(order));
View Full Code Here

        buf.unref();

        ByteBuffer outBuf = new ByteBuffer(8);
        outBuf.writeByte(RfbConstants.CLIENT_KEYBOARD_EVENT);

        outBuf.writeByte((order.pressed) ? RfbConstants.KEY_DOWN : RfbConstants.KEY_UP);
        outBuf.writeShort(0); // padding
        outBuf.writeInt(map_en_us(order));

        pushDataToAllOuts(outBuf);
    }
View Full Code Here

            System.out.println("[" + this + "] INFO: Data received: " + buf + ".");
        buf.unref();

        ByteBuffer outBuf = new ByteBuffer(4 + encodings.length * 4);

        outBuf.writeByte(RfbConstants.CLIENT_SET_ENCODINGS);

        outBuf.writeByte(0);// padding

        outBuf.writeShort(encodings.length);

View Full Code Here

        ByteBuffer outBuf = new ByteBuffer(4 + encodings.length * 4);

        outBuf.writeByte(RfbConstants.CLIENT_SET_ENCODINGS);

        outBuf.writeByte(0);// padding

        outBuf.writeShort(encodings.length);

        for (int i = 0; i < encodings.length; i++) {
            outBuf.writeInt(encodings[i]);
View Full Code Here

        if (height == null)
            height = screen.getFramebufferHeight();

        ByteBuffer outBuf = new ByteBuffer(10);

        outBuf.writeByte(RfbConstants.CLIENT_FRAMEBUFFER_UPDATE_REQUEST);
        outBuf.writeByte((incremental) ? RfbConstants.FRAMEBUFFER_INCREMENTAL_UPDATE_REQUEST : RfbConstants.FRAMEBUFFER_FULL_UPDATE_REQUEST);
        outBuf.writeShort(x);
        outBuf.writeShort(y);
        outBuf.writeShort(width);
        outBuf.writeShort(height);
View Full Code Here

            height = screen.getFramebufferHeight();

        ByteBuffer outBuf = new ByteBuffer(10);

        outBuf.writeByte(RfbConstants.CLIENT_FRAMEBUFFER_UPDATE_REQUEST);
        outBuf.writeByte((incremental) ? RfbConstants.FRAMEBUFFER_INCREMENTAL_UPDATE_REQUEST : RfbConstants.FRAMEBUFFER_FULL_UPDATE_REQUEST);
        outBuf.writeShort(x);
        outBuf.writeShort(y);
        outBuf.writeShort(width);
        outBuf.writeShort(height);
View Full Code Here

            System.out.println("[" + this + "] INFO: Data received: " + buf + ".");
        buf.unref();

        ByteBuffer outBuf = new ByteBuffer(20);

        outBuf.writeByte(RfbConstants.CLIENT_SET_PIXEL_FORMAT);

        // Padding
        outBuf.writeByte(0);
        outBuf.writeByte(0);
        outBuf.writeByte(0);
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.