• Netty核心组件之Channel



    一种关联网络套接字或能够进行I/O 操作(例如读取,写入,连接和绑定)的组件的组件
    channel提供给用户以下用途:
    channel的当前状态

    channel的配置参数
    channel支持的I/O操作(例如:读、写、连接、绑定)

    channel关联的能够处理所有I/O事件和请求的ChannelPipeline
    所有的I/O操作都是异步的

    channel是分层的 * <p> * A {
    @link Channel} can have a {@linkplain #parent() parent} depending on * how it was created. For instance, a {@link SocketChannel}, that was accepted * by {@link ServerSocketChannel}, will return the {@link ServerSocketChannel} * as its parent on {@link #parent()}.
    一个Channel * <p> * The semantics of the hierarchical structure depends on the transport * implementation where the {
    @link Channel} belongs to. For example, you could * write a new {@link Channel} implementation that creates the sub-channels that * share one socket connection, as <a href="http://beepcore.org/">BEEP</a> and * <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> do. * * <h3>Downcast to access transport-specific operations</h3> * <p> * Some transports exposes additional operations that is specific to the * transport. Down-cast the {@link Channel} to sub-type to invoke such * operations. For example, with the old I/O datagram transport, multicast * join / leave operations are provided by {@link DatagramChannel}. * * <h3>Release resources</h3> * <p> * It is important to call {@link #close()} or {@link #close(ChannelPromise)} to release all * resources once you are done with the {@link Channel}. This ensures all resources are * released in a proper way, i.e. filehandles. */

         

  • 相关阅读:
    ObjectARX 学习笔记007:创建模态对话框的一般步骤
    c#的DateTime.Now函数详解
    LinQ 使用案例1
    LinQ 泛型方法Array>ForEach在数组中进行迭代并调用自定义的委托
    LinQ Lambda表达式用作泛型活动
    win7x64bit VS2010 CAD2013断点 调试 捕捉成功,困扰一周的问题解决了
    法兰数据库设计方案
    关于CAD的开发思路
    法兰程序CAD开发的进展
    法兰动态块设计思路
  • 原文地址:https://www.cnblogs.com/mmh760/p/14081797.html
Copyright © 2020-2023  润新知