protected internal void discardSomeReadBytes()
 {
     if (cumulation != null && !first && cumulation.ReferenceCount == 1)
     {
         // discard some bytes if possible to make more room in the
         // buffer but only if the refCnt == 1  as otherwise the user may have
         // used slice().retain() or duplicate().retain().
         //
         // See:
         // - https://github.com/netty/netty/issues/2327
         // - https://github.com/netty/netty/issues/1764
         cumulation.DiscardSomeReadBytes();
     }
 }
Ejemplo n.º 2
0
 public virtual IByteBuffer DiscardSomeReadBytes()
 {
     _ = Buf.DiscardSomeReadBytes();
     return(this);
 }