//--------------------------------------------------------------------- public void addSession(IChannelHandlerContext c) { IChannelGroup g = ChannelGroup; if (g == null) { lock (this) { if (ChannelGroup == null) { g = ChannelGroup = new DefaultChannelGroup(c.Executor); } } } ChannelGroup.Add(c.Channel); }