private void ProcessAccept(Socket acceptSocket) { var worker = new ConnectionWorker(acceptSocket); worker.LastActiveTime = DateTime.Now; this.master.AddWorker(worker); worker.StartReceive(); }
public void AddWorker(ConnectionWorker worker) { lock (lock_connectionObjects) { if (this.connectionObjects.Contains(worker)) { return; } this.connectionObjects.Add(worker); } }