GaleServerInitializer.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:gale 作者:
@Override
protected void initChannel(SocketChannel ch) throws Exception {
  ChannelPipeline pipeline = ch.pipeline();
  //inbound handler
  pipeline.addLast(new HttpRequestDecoder());
  pipeline.addLast(new HttpContentDecompressor());

  //outbound handler
  pipeline.addLast(new HttpResponseEncoder());
  pipeline.addLast(new HttpContentCompressor());
  //pipeline.addLast(new ChunkedWriteHandler());

  pipeline.addLast(new HttpObjectAggregator(this.sc.getSize()));
  pipeline.addLast(this.galeHttpHandler);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号