Package com.tenio.network.netty.datagram
Class NettyDatagramHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- com.tenio.network.netty.BaseNettyHandler
-
- com.tenio.network.netty.datagram.NettyDatagramHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public final class NettyDatagramHandler extends BaseNettyHandler
In this server, a UDP connection is treated as a sub-connection. That means you need to create one main connection between one client and the server first (a TCP connection). When it's finished, that client can send a request for making a link.- Author:
- kong
- See Also:
BaseNettyHandler
-
-
Constructor Summary
Constructors Constructor Description NettyDatagramHandler(int index, IEventManager eventManager, BaseConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
-
Methods inherited from class com.tenio.network.netty.BaseNettyHandler
_channelInactive, _channelRead, _exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
NettyDatagramHandler
public NettyDatagramHandler(int index, IEventManager eventManager, BaseConfiguration configuration)
-
-
Method Detail
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
-