Beispiel #1
0
        private void OnClientDisconnectInternal(RawClient client, DisconnectEventArgs args)
        {
            bool ok = false;

            lock ( m_Clients ) {
                if (m_Clients.Contains(client))
                {
                    client.DisconnectEvent -= OnClientDisconnectInternal;
                    client.ConnectEvent    -= OnClientConnectInternal;
                    m_Clients.Remove(client);
                    ok = true;
                }
            }
            if (ok)
            {
                OnClientDisconnect(client, args);
                if (ClientDisconnectEvent != null)
                {
                    ClientDisconnectEvent.Invoke(client, args);
                }
            }
        }
Beispiel #2
0
 protected virtual void OnClientDisconnect(RawClient client, DisconnectEventArgs args)
 {
 }