From 98a6dbf4be8e222d5efa222908e3e18b4b1a5e3d Mon Sep 17 00:00:00 2001 From: Thibault Deutsch Date: Sat, 9 Dec 2017 17:13:40 +0100 Subject: [PATCH] Higher limit of frame size --- .../main/java/com/epita/eventbus/NettyClientInitializer.java | 2 +- .../src/main/java/com/epita/eventbus/ServerInitializer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eventbus/src/main/java/com/epita/eventbus/NettyClientInitializer.java b/eventbus/src/main/java/com/epita/eventbus/NettyClientInitializer.java index 161b2b1..4fc7f1e 100644 --- a/eventbus/src/main/java/com/epita/eventbus/NettyClientInitializer.java +++ b/eventbus/src/main/java/com/epita/eventbus/NettyClientInitializer.java @@ -21,7 +21,7 @@ public NettyClientInitializer(Consumer c) { public void initChannel(SocketChannel ch) { final ChannelPipeline pipeline = ch.pipeline(); - pipeline.addLast(new DelimiterBasedFrameDecoder(8192, Delimiters.lineDelimiter())); + pipeline.addLast(new DelimiterBasedFrameDecoder(1048576*2, Delimiters.lineDelimiter())); pipeline.addLast(new StringDecoder()); pipeline.addLast(new StringEncoder()); diff --git a/eventbus/src/main/java/com/epita/eventbus/ServerInitializer.java b/eventbus/src/main/java/com/epita/eventbus/ServerInitializer.java index d8d66d0..3d44cb5 100644 --- a/eventbus/src/main/java/com/epita/eventbus/ServerInitializer.java +++ b/eventbus/src/main/java/com/epita/eventbus/ServerInitializer.java @@ -14,7 +14,7 @@ public class ServerInitializer extends ChannelInitializer { protected void initChannel(SocketChannel socketChannel) { final ChannelPipeline pipeline = socketChannel.pipeline(); - pipeline.addLast(new DelimiterBasedFrameDecoder(8192, Delimiters.lineDelimiter())); + pipeline.addLast(new DelimiterBasedFrameDecoder(1048576*2, Delimiters.lineDelimiter())); pipeline.addLast(new StringDecoder()); pipeline.addLast(new StringEncoder());