title: Can netty handle re-segmented TLS records?
body: <p>Since there is no correspondence between NIO TCP read events (essentially TCP buffered segments) and the TLS records carried as payload inside them, I am trying to figure out if Netty handles correctly TLS records that are randomly re-segmented into separate NIO reads.</p>
  
  <p>In SSLEngine.unwrap() this would cause a BUFFER_UNDERFLOW which is handled simply by breaking the loop here:
  <a href="https://github.com/netty/netty/blob/master/handler/src/main/java/io/netty/handler/ssl/SslHandler.java#L483" rel="nofollow">https://github.com/netty/netty/blob/master/handler/src/main/java/io/netty/handler/ssl/SslHandler.java#L483</a></p>
  
  <p>Does anyone have experience with re-segmentation and if this code is sufficient to recover TLS records in all cases? Any advice on testing it would be appreciated?</p>