Example #1
0
        void Dispose(bool disposing)
        {
            disposed = true;

            if (disposing)
            {
                if (disposed || Interlocked.CompareExchange(ref in_progress, 0, 0) != 0)
                {
                    return;
                }
                if (Worker != null)
                {
                    Worker.Dispose();
                    Worker = null;
                }
            }
            AcceptSocket   = null;
            Buffer         = null;
            BufferList     = null;
            RemoteEndPoint = null;
            UserToken      = null;
#if !NET_2_1
            SendPacketsElements = null;
#endif
        }
Example #2
0
        void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (Worker != null)
                {
                    Worker.Dispose();
                    Worker = null;
                }
            }
            AcceptSocket   = null;
            Buffer         = null;
            BufferList     = null;
            RemoteEndPoint = null;
            UserToken      = null;
#if !NET_2_1
            SendPacketsElements = null;
#endif
        }