Commit 89c4716b authored by duanruiming's avatar duanruiming

[update] 发送连接密码

parent 10ec2bf0
......@@ -53,8 +53,11 @@ public class NettyClient {
.addLast(new NettyServerHandler(threadPoolExecutor));
channelGroup.add(socketChannel);
String key = StringUtils.join(socketChannel.remoteAddress().getHostString(), ":".intern(), socketChannel.remoteAddress().getPort());
log.info("client {} is connect success", key);
IP_PORT_CHANNEL_ID_MAP.put(key, socketChannel.id());
String str = "2a320d0a24340d0a415554480d0a2431360d0a536d2a674234504742333939514241390d0a";
MessageResultPojo resultPojo = NettyClient.sendMessage("10.102.1.204", 5050, str, "80", 300);
log.info("信号返回字符串:{}", resultPojo);
log.info("{}:客户端连接成功", key);
}
});
ChannelFuture channelFuture = bootstrap.bind(localPort).sync();
......
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