12345678910111213141516171819202122 |
- package com.persagy.cameractl.service.socket;
- import io.netty.channel.ChannelHandlerContext;
- import io.netty.channel.SimpleChannelInboundHandler;
- /**
- *
- * @version 1.0.0
- * @company persagy
- * @author zhangqiankun
- * @date 2021年10月12日 上午10:54:49
- */
- public class TestHandler extends SimpleChannelInboundHandler<String> {
- @Override
- protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
- System.out.println("服务端接收到的消息: " + msg);
- ctx.writeAndFlush("这是服务端发送的");
- }
-
- }
|