예제 #1
0
        private void AcceptThread(object state)
        {
            while (!this.isClosed)
            {
                try
                {
                    var tcpClient = this.tcpListener.AcceptTcpClient();
                    var client    = new SimpleClient(tcpClient, this.scene);

                    lock (this.clientsLock)
                    {
                        this.clients.Add(client);
                    }
                }
                catch (SocketException ex)
                {
                    logger.Info("Disconnect {0}", ex.Message);

                    break;
                }
            }
        }
예제 #2
0
        private void AcceptThread(object state)
        {
            while (!this.isClosed)
            {
                try
                {
                    var tcpClient = this.tcpListener.AcceptTcpClient();
                    var client = new SimpleClient(tcpClient, this.scene);

                    lock (this.clientsLock)
                    {
                        this.clients.Add(client);
                    }
                }
                catch (SocketException ex)
                {
                    logger.Info("Disconnect {0}", ex.Message);

                    break;
                }
            }
        }