Skip to content

Commit

Permalink
最大帧长度修改为5M
Browse files Browse the repository at this point in the history
  • Loading branch information
ztgreat committed Apr 13, 2019
1 parent 7c944c2 commit 087f74c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions proxy-client/src/main/java/com/proxy/client/ProxyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public class ProxyClient {
private int port;

/**
* 2M
* 5M
*/
private int maxContentLength = 2*1024 * 1024;
private int maxContentLength = 5*1024 * 1024;


/**
Expand Down Expand Up @@ -94,6 +94,7 @@ public void start() throws InterruptedException {
@Override
public void initChannel(SocketChannel ch)
throws Exception {
//ch.pipeline().addLast("logs", new LoggingHandler(LogLevel.DEBUG));
ch.pipeline().addLast("idleStateHandler", new IdleStateHandler(10*3, 15*3, 20*3));
ch.pipeline().addLast(new ProxyMessageDecoder(2*1024*1024,0,4));
ch.pipeline().addLast(new ProxyMessageEncoder());
Expand Down
4 changes: 2 additions & 2 deletions proxy-server/src/main/java/com/proxy/server/ProxyServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class ProxyServer implements LifeCycle{
private static Logger logger = LoggerFactory.getLogger(ProxyServer.class);

/**
* 最大帧长度
* 最大帧长度 5M
*/
private static final int MAX_FRAME_LENGTH = 2 * 1024 * 1024;
private static final int MAX_FRAME_LENGTH = 5 * 1024 * 1024;
/**
* 长度域偏移
*/
Expand Down

0 comments on commit 087f74c

Please sign in to comment.