| | |
| | | package com.example.erp.tools.netty; |
| | | |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.channel.SimpleChannelInboundHandler; |
| | | import io.netty.handler.codec.http.FullHttpRequest; |
| | | import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class MyWebSocketHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> { |
| | | |
| | | public class MyWebSocketHandler { |
| | | // public class MyWebSocketHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> { |
| | | /* |
| | | @Override |
| | | public void channelActive(ChannelHandlerContext ctx) throws Exception { |
| | | System.out.println("与客户端建立连接,通道开启!"); |
| | |
| | | }else{ |
| | | return map; |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | |