Netty -- Discard Server

来源:互联网 发布:怎么做淘宝图片 编辑:程序博客网 时间:2024/03/29 09:11
  1. ChannelHandlerAdapter
    provides various event handler methods that you can override. For now, it is just enough to extend ChannelHandlerAdapter rather than to implement the handler interface by yourself.
  2. ByteBuf
    ByteBuf is a reference-counted object which has to be released explicitly via the release() method. Please keep in mind that it is the handler’s responsibility to release any reference-counted object passed to the handler.
  3. NioEventLoopGroup
    A multithreaded event loop that handles I/O operation. How many Threads are used and how they are mapped to the created Channels depends on the EventLoopGroup implementation and may be even configurable via a constructor.
  4. ServerBootStrap
    A helper class that sets up a server.
  5. NioServerSocketChannel
    Instantiate a new Channel to accept incoming connections.
  6. ChannelInitializer
    A special handler that is purposed to help a user configure a new Channel. It is most likely that you want to configure the ChannelPipeline of the new Channel by adding some handlers such as DiscardServerHandler to implement your network application.
  7. Dealing with a Stream-based Transport
    In a stream-based transport such as TCP/IP, received data is stored into a socket receive buffer. Unfortunately, the buffer of a stream-based transport is not a queue of packets but a queue of bytes.
  8. ChannelInboundHandlerAdapter
  9. ByteToMessageDecoder
  10. ChannelOutboundHandlerAdapter
  11. MessageToByteEncoder
0 0