3.1.5.2 Processing the PayloadLength Field of the Tunnel PDU Header
The multitransport connection operates in message mode. The PayloadLength field of the RDP_TUNNEL_HEADER structure (section 2.2.1.1) indicates the total number of bytes in the PDU, excluding the length of the RDP_TUNNEL_HEADER structure. The receiving endpoint uses this value to continue reading the incoming byte stream from the lower layer until the total number of bytes read equals the length contained in the PayloadLength field. After the receiver has read the entire PDU, the PDU MUST be delivered to the upper layers.