private void OnAcceptConnect(long conn_idx) { lock (ThreadScheduler.Instance.LogicLock) { m_channel = NetChannelPools.Spawn(); m_channel.Setup(this, m_conn_idx); if (OnConnected != null) { OnConnected(m_channel.conn_idx); } } }
private void OnAcceptConnect(long conn_idx) { lock (ThreadScheduler.Instance.LogicLock) { NetChannel channel = NetChannelPools.Spawn(); channel.Setup(this, conn_idx); m_channels.Add(channel.conn_idx, channel); if (OnAccept != null) { OnAccept(channel.conn_idx); } } }