Commit 325cdc45 authored by 赵啸非's avatar 赵啸非

修改消息组件

parent 1416ad36
......@@ -29,7 +29,7 @@ public class NettyStartedService implements IApplicationStartedService {
public void start() {
logger.info("开始netty服务....");
thread = new Thread(() -> {
controlServer.run(61112);
controlServer.run(7788);
});
thread.setDaemon(true);
thread.start();
......
......@@ -34,7 +34,7 @@ public class UDPClientHandler extends SimpleChannelInboundHandler<DatagramPacket
for (int i = 0; i < 10; i++) {
log.info("send msg:{}",i);
ctx.writeAndFlush(new DatagramPacket(Unpooled.copiedBuffer("我在广播" + i, Charset.forName("utf-8")),
new InetSocketAddress("255.255.255.255", 61112)));
new InetSocketAddress("192.168.0.98", 7788)));
try {
TimeUnit.SECONDS.sleep(2);
} catch (InterruptedException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment