title: Custom FrameDecoder in netty
body: <p>I have problem with FrameDecoder of netty as following.</p>
  
  <ul>
  <li>packet is fragmented in to {n} frames then FrameDecoder processing correctly.</li>
  <li>If many packets are composed to one frame and send to server(when client sending small packet data continuously), then FrameDecoder only reads the first packet. The remaing is ignored. </li>
  </ul>
  
  <p>Can i get the remaining data to be continued executed by FrameDecoder?</p>
  
  <pre><code>public class BinaryFrameDecoder extends FrameDecoder {
      @Override
      protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer){
          if(buffer.readableBytes() &lt; 2){
              return null;
          }
  
          int length = buffer.getShort(buffer.readerIndex());
          if(buffer.readableBytes() &lt; length + 2){
              return null;
          }
          buffer.skipBytes(2);                
          return buffer;
      }
  }
  </code></pre>