title: How does the TLS Record Protocol reassemble received data?
body: <p>I can't find detailed information about how the TLS Record Protocol is able to reassemble received data. In the RFC 5246:</p>
  
  <blockquote>
    <p>Received data is decrypted, verified, decompressed, <strong>reassembled</strong>,
    and then delivered to higher-level clients.</p>
  </blockquote>
  
  <p>But HOW? This is how the record layer data looks like:</p>
  
  <pre><code>struct {
      ContentType type;
      ProtocolVersion version;
      uint16 length;
      opaque fragment[TLSPlaintext.length];
  } TLSPlaintext;
  </code></pre>
  
  <p>The length field is just the length of the fragment:</p>
  
  <blockquote>
    <p>The length (in bytes) of the following TLSPlaintext.fragment</p>
  </blockquote>
  
  <p>I would expect to see the complete length in the Record Protocol Header. Google gives almost no results for this which makes me feel I'm missing something obvious...</p>