public class WsServerHandler
extends io.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
限定符和类型 | 字段和说明 |
---|---|
static io.netty.util.AttributeKey<io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker> |
HandshakerKey |
static io.netty.util.AttributeKey<java.lang.String> |
ResourceDescriptorKey |
static io.netty.util.AttributeKey<WebSocketImpl> |
SessionKey |
构造器和说明 |
---|
WsServerHandler() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
发生异常时执行的操作
|
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
客户端掉线时的操作
|
void |
handleWebSocketFrame(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.websocketx.WebSocketFrame frame) |
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
public static final io.netty.util.AttributeKey<java.lang.String> ResourceDescriptorKey
public static final io.netty.util.AttributeKey<io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker> HandshakerKey
public static final io.netty.util.AttributeKey<WebSocketImpl> SessionKey
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
channelRead0
在类中 io.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
java.lang.Exception
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
channelReadComplete
在接口中 io.netty.channel.ChannelInboundHandler
channelReadComplete
在类中 io.netty.channel.ChannelInboundHandlerAdapter
java.lang.Exception
public void handleWebSocketFrame(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.websocketx.WebSocketFrame frame) throws java.lang.Exception
java.lang.Exception
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
handlerRemoved
在接口中 io.netty.channel.ChannelHandler
handlerRemoved
在类中 io.netty.channel.ChannelHandlerAdapter
java.lang.Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
exceptionCaught
在接口中 io.netty.channel.ChannelHandler
exceptionCaught
在接口中 io.netty.channel.ChannelInboundHandler
exceptionCaught
在类中 io.netty.channel.ChannelInboundHandlerAdapter
java.lang.Exception