private void OnClientConnectInternal(RawClient client, ConnectEventArgs args) { bool ok = false; lock ( m_Clients ) { if (!m_Clients.Contains(client)) { m_Clients.Add(client); ok = true; } } if (ok) { OnClientConnect(client, args); if (ClientConnectEvent != null) { ClientConnectEvent.Invoke(client, args); } } }
protected virtual void OnClientConnect(RawClient client, ConnectEventArgs args) { }