public virtual void Dispose() { if (Protocol != null) { Protocol.IOHandler = null; Protocol.EnqueueForDelete(); Protocol = null; } this.UnRegisterIOHandler(); }
public static void EnqueueForDelete(IOHandler ioHandler) { ioHandler.WriteEnabled = false; ioHandler.ReadEnabled = false; ioHandler.AcceptEnabled = false; ioHandler.DisableTimer(); ioHandler.Dispose(); //DeadIoHandler.AddLast(ioHandler); }