예제 #1
0
        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);
            }
        }