Esempio n. 1
0
 public CClientsHandler(List <CLight> lights)
 {
     this.m_lights  = lights;
     this.m_socket  = new CTcpServerSocket();
     this.m_clients = new List <CClient>();
     this.m_mutex   = new CMutex();
 }
Esempio n. 2
0
        internal void Cleanup()
        {
            //kick off all clients
            Util.Log("disconnecting clients");

            lock (m_mutex)
            {
                while (m_clients.Count > 0)
                {
                    RemoveClient(m_clients.First());
                }
            }

            Util.Log("closing listening socket");
            m_socket.Close();
            m_socket.Dispose();
            m_socket = null;

            Util.Log("clients handler stopped");
        }