private void OnClientAccepted(IAsyncResult ar) { if (TryEndAccept(ar, out var client)) { var channel = new NetworkChannel(_messageProcessor); channel.OnDisconnect += ChannelOnDisconnect; _channels[client] = channel; _channelObserver.OnChannelConnected(channel); channel.Listen(client); BeginAcceptClient(); } }