for (Map.Entry<String, Channel> channel : webSocketClientMaps.entrySet()) {
if (channel.getValue() == null || !channel.getValue().isOpen() || channel.getValue() == ctx.channel()) {
continue;
}
if (startsWith) {
CNNettyUtil.sendDataToTargetChannel(channel.getValue(),
CNNettyUtil.toJson(successSocketResult(jsonObject)));
}
}
}
CNNettyUtil.sendDataToTargetChannel(ctx.channel(),
CNNettyUtil.toJson(successSocketResult(1, success)));
為什么要加一個這個判斷 channel.getValue() == ctx.channel() 導致一直跳過
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/269587.html
標籤:Web 開發
下一篇:哪位大佬知道這是什么 情況?
