Home > Back-end >  To solve the websocket message channel
To solve the websocket message channel

Time:03-25

For (Map. Entry Channel: webSocketClientMaps entrySet ()) {
If (channel. The getValue ()==null | |! Channel. The getValue (). IsOpen () | | channel. GetValue ()==CTX. Channel () {
)continue;
}
If (startsWith) {
CNNettyUtil. SendDataToTargetChannel (channel. The getValue (),
CNNettyUtil. ToJson (successSocketResult (jsonObject)));
}
}
}
CNNettyUtil. SendDataToTargetChannel (CTX) channel (),
CNNettyUtil. ToJson (successSocketResult (1, success)));

Why do you want to add one of this judgment channel. The getValue ()==CTX. Channel () causes have been skipped
  • Related