コード例 #1
0
ファイル: ConnectionAcceptor.cs プロジェクト: yaozd/Sword
        private void ProcessAccept(Socket acceptSocket)
        {
            var worker = new ConnectionWorker(acceptSocket);

            worker.LastActiveTime = DateTime.Now;

            this.master.AddWorker(worker);

            worker.StartReceive();
        }
コード例 #2
0
        public void AddWorker(ConnectionWorker worker)
        {
            lock (lock_connectionObjects)
            {
                if (this.connectionObjects.Contains(worker))
                {
                    return;
                }

                this.connectionObjects.Add(worker);
            }
        }