在netty中已经对web socket的分片重组进行了相应的实现,具体的实现类是 WebSocketFrameAggregator,该类继承自netty的消息聚合器MessageAggregator。
MessageAggregator
......
* @param <I> the type that covers both start message and content message
* @param <S> the type of the start message
* @param <C> the type of the content message (must be a subtype of {
@link ByteBufHolder})
* @param <O> the type of the aggregated message (must be a subtype of {
@code S} and {
@link ByteBufHolder})
*