Exemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////



        #region IDisposable Members

        public void Dispose()
        {
            //foreach(NetServiceConnection client in mConnectedClients.ToArray() )
            //{
            //   client.Dispose();
            //}
            //mConnectedClients.Clear();
            //foreach (NetServiceConnection client in mDebuggerClients.ToArray() )
            //{
            //   client.Dispose();
            //}
            //mDebuggerClients.Clear();
            foreach (NetServiceConnection client in mAllClients.ToArray())
            {
                client.Dispose();
            }


            cmgr.closeClientConnections();
            cmgr = null;

            debuggerCMGR.closeClientConnections();
            debuggerCMGR = null;

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
Exemplo n.º 2
0
        public LobbyLogic()
        {
            cmgr = new NetServiceHost(1337);
            cmgr.mConnectedDelegates += new NetServiceHost.ConnectedDelegate(OnNewClientConnection);

            debuggerCMGR = new NetServiceHost(1339);
            debuggerCMGR.mConnectedDelegates += new NetServiceHost.ConnectedDelegate(OnNewDebuggerClientConnection);
        }