|
31 | 31 | import org.jboss.netty.handler.codec.http.HttpContentDecompressor;
|
32 | 32 | import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder;
|
33 | 33 | import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder;
|
| 34 | +import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrameAggregator; |
34 | 35 | import org.jboss.netty.handler.ssl.SslHandler;
|
35 | 36 | import org.jboss.netty.handler.stream.ChunkedWriteHandler;
|
36 | 37 | import org.jboss.netty.util.Timer;
|
@@ -75,6 +76,7 @@ public class ChannelManager {
|
75 | 76 | public static final String INFLATER_HANDLER = "inflater";
|
76 | 77 | public static final String CHUNKED_WRITER_HANDLER = "chunkedWriter";
|
77 | 78 | public static final String WS_DECODER_HANDLER = "ws-decoder";
|
| 79 | + public static final String WS_FRAME_AGGREGATOR = "ws-aggregator"; |
78 | 80 | public static final String WS_ENCODER_HANDLER = "ws-encoder";
|
79 | 81 |
|
80 | 82 | private final AsyncHttpClientConfig config;
|
@@ -418,6 +420,7 @@ public void upgradePipelineForWebSockets(ChannelPipeline pipeline) {
|
418 | 420 | pipeline.addAfter(HTTP_HANDLER, WS_ENCODER_HANDLER, new WebSocket08FrameEncoder(true));
|
419 | 421 | pipeline.remove(HTTP_HANDLER);
|
420 | 422 | pipeline.addBefore(WS_PROCESSOR, WS_DECODER_HANDLER, new WebSocket08FrameDecoder(false, false, 10 * 1024));
|
| 423 | + pipeline.addAfter(WS_DECODER_HANDLER, WS_FRAME_AGGREGATOR, new WebSocketFrameAggregator(10 * 1024)); |
421 | 424 | }
|
422 | 425 |
|
423 | 426 | public final Callback newDrainCallback(final NettyResponseFuture<?> future, final Channel channel, final boolean keepAlive,
|
|
0 commit comments