zoukankan      html  css  js  c++  java
  • netty ChannelHandler

    Netty中有哪些自带的ChannelHandler?

    • SslHandler:负责对请求进行加密和解密,是放在ChannelPipeline中的第一个ChannelHandler

    图片描述

    • HttpClientCodec和HttpServerCodec:HttpClientCodec负责将请求字节解码为HttpRequest、HttpContent和LastHttpContent消息,以及对应的转为字节;HttpServerCodec负责服务端中将字节码解析成HttpResponse、HttpContent和LastHttpContent消息,以及对应的将它转为字节
    HttpServerCodec 里面组合了HttpResponseEncoder和HttpRequestDecoder

    HttpClientCodec 里面组合了HttpRequestEncoder和HttpResponseDecoder

    • HttpObjectAggregator: 负责将http聚合成完整的消息,而不是原始的多个部分
    • HttpContentCompressor和HttpContentDecompressor:HttpContentCompressor用于服务器压缩数据,HttpContentDecompressor用于客户端解压数据
    • IdleStateHandler:连接空闲时间过长,触发IdleStateEvent事件
    • ReadTimeoutHandler:指定时间内没有收到任何的入站数据,抛出ReadTimeoutException异常,并关闭channel
    • WriteTimeoutHandler:指定时间内没有任何出站数据写入,抛出WriteTimeoutException异常,并关闭channel
    • DelimiterBasedFrameDecoder:使用任何用户提供的分隔符来提取帧的通用解码器
    • FixedLengthFrameDecoder:提取在调用构造函数时的定长帧
    • ChunkedWriteHandler:将大型文件从文件系统复制到内存【DefaultFileRegion进行大型文件传输】
  • 相关阅读:
    python 函数
    python控制流
    python数据类型转换
    python变量
    chardet查看字符串的编码(非常好用)
    python编码转换
    系统、浏览器兼容性测试注意事项
    python数据类型
    Python二进制转十进制算法、十进转二进制算法
    介绍几个C#正则表达式工具
  • 原文地址:https://www.cnblogs.com/GHzcx/p/11579891.html
Copyright © 2011-2022 走看看