Package streamer

Examples of streamer.ByteBuffer.writeShort()


        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

        // RDP_NEG_REQ::type
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);
View Full Code Here

        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)
        header.writeShort(RdpConstants.CHANNEL_IO);

        // Data priority: high (0x40), segmentation: begin (0x20) | end (0x10)
View Full Code Here

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

        // 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;
View Full Code Here

        // 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();

        pushDataToPad(STDOUT, buf);
View Full Code Here

    private void sendChannelRequest(int channel) {
        ByteBuffer buf = new ByteBuffer(5, true);

        buf.writeByte(0x38); // Channel Join request

        buf.writeShort(state.serverUserChannelId - 1001); // ChannelJoinRequest::initiator: 1004
        buf.writeShort(channel);

        pushDataToOTOut(buf);
    }
View Full Code Here

        ByteBuffer buf = new ByteBuffer(5, true);

        buf.writeByte(0x38); // Channel Join request

        buf.writeShort(state.serverUserChannelId - 1001); // ChannelJoinRequest::initiator: 1004
        buf.writeShort(channel);

        pushDataToOTOut(buf);
    }

    /**
 
View Full Code Here

        // FastPath, 1 event, no checksum, not encrypted
        data.writeByte(0x4);

        // Length of full packet, including length field, in network order.
        // Topmost bit of first byte indicates that field has 2 bytes
        data.writeShort((1 + 2 + buf.length) | 0x8000);
        data.trimAtCursor();

        buf.prepend(data);

        pushDataToAllOuts(buf);
View Full Code Here

        // MCS Send Data Request PDU
        buf.writeByte(0x64);

        // Initiator: 0x03 + 1001 = 1004
        buf.writeShort(3);

        // Channel ID: 1003
        buf.writeShort(1003);

        // Data priority: high, segmentation: begin | end (0x40 | 0x20 | 0x10 = 0x70)
View Full Code Here

        // Initiator: 0x03 + 1001 = 1004
        buf.writeShort(3);

        // Channel ID: 1003
        buf.writeShort(1003);

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

        // User data length: (variable length field)
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.