Package streamer

Examples of streamer.ByteBuffer.writeByte()


        super.onStart();

        int length = 1;
        ByteBuffer buf = new ByteBuffer(length, true);

        buf.writeByte(0x28); // AttachUserRequest

        pushDataToOTOut(buf);

        switchOff();
    }
View Full Code Here


        // Length of packet without length field
        int length = 33 + userName.length();
        ByteBuffer buf = new ByteBuffer(length, true);

        // Type (high nibble) = 0xe = CR TPDU; credit (low nibble) = 0
        buf.writeByte(X224_TPDU_CONNECTION_REQUEST);

        buf.writeShort(0); // Destination reference = 0
        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie
View Full Code Here

        // Type (high nibble) = 0xe = CR TPDU; credit (low nibble) = 0
        buf.writeByte(X224_TPDU_CONNECTION_REQUEST);

        buf.writeShort(0); // Destination reference = 0
        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
        buf.writeByte(RdpConstants.RDP_NEG_REQ_TYPE_NEG_REQ);
        // RDP_NEG_REQ::flags (0)
View Full Code Here

        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
        buf.writeByte(RdpConstants.RDP_NEG_REQ_TYPE_NEG_REQ);
        // RDP_NEG_REQ::flags (0)
        buf.writeByte(RdpConstants.RDP_NEG_REQ_FLAGS);
        // RDP_NEG_REQ::length (constant: 8) short int in LE format
        buf.writeByte(0x08);
        buf.writeByte(0x00);
View Full Code Here

        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
        buf.writeByte(RdpConstants.RDP_NEG_REQ_TYPE_NEG_REQ);
        // RDP_NEG_REQ::flags (0)
        buf.writeByte(RdpConstants.RDP_NEG_REQ_FLAGS);
        // RDP_NEG_REQ::length (constant: 8) short int in LE format
        buf.writeByte(0x08);
        buf.writeByte(0x00);

        // RDP_NEG_REQ: Requested protocols: PROTOCOL_SSL
View Full Code Here

        // Length of combined capabilities + 4 bytes (number of capabilities and
        // padding) (LE)
        header.writeShortLE(buf.length + 4);

        header.writeString(SOURCE_DESC, RdpConstants.CHARSET_8);
        header.writeByte(0);

        // Number of capabilities
        header.writeShortLE(numberCapabilities);

        // Padding 2 bytes
View Full Code Here

    }

    private ByteBuffer createMCSHeader(ByteBuffer buf) {
        ByteBuffer header = new ByteBuffer(100);
        // MCS Send Data Request
        header.writeByte(0x64);

        // Initiator: 1004 (1001+3)
        header.writeShort(3);

        // Channel ID: 1003 (I/O channel)
View Full Code Here

        // Channel ID: 1003 (I/O channel)
        header.writeShort(RdpConstants.CHANNEL_IO);

        // Data priority: high (0x40), segmentation: begin (0x20) | end (0x10)
        header.writeByte(0x70);

        int length = buf.length + 26;

        // User data length: (variable length field, LE)
        header.writeVariableShort(length);
View Full Code Here

        if (buf.length + 4 > 65535)
            throw new RuntimeException("Packet is too long for TPKT (max length 65535-4): " + buf + ".");

        ByteBuffer data = new ByteBuffer(4);
        // TPKT version
        data.writeByte(3);
        // Reserved
        data.writeByte(0);
        // Packet length, including length of the header
        data.writeShort(buf.length + 4);
View Full Code Here

        ByteBuffer data = new ByteBuffer(4);
        // TPKT version
        data.writeByte(3);
        // Reserved
        data.writeByte(0);
        // Packet length, including length of the header
        data.writeShort(buf.length + 4);

        buf.prepend(data);
        data.unref();
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.