示例#1
0
        public virtual void Dispose()
        {
            if (IsDisposed)
            {
                return;
            }

            IsDisposed = true;

            if (Socket != default(Socket))
            {
                PodeSocket.CloseSocket(Socket);
            }

            if (InputStream != default(Stream))
            {
                InputStream.Dispose();
            }

            if (BufferStream != default(MemoryStream))
            {
                BufferStream.Dispose();
            }

            PodeHelpers.WriteErrorMessage($"Request disposed", Context.Listener, PodeLoggingLevel.Verbose, Context);
        }
示例#2
0
 public virtual void Dispose()
 {
     if (Socket != default(Socket))
     {
         PodeSocket.CloseSocket(Socket);
     }
 }
示例#3
0
        public virtual void Dispose()
        {
            if (Socket != default(Socket))
            {
                PodeSocket.CloseSocket(Socket);
            }

            if (InputStream != default(Stream))
            {
                InputStream.Dispose();
            }

            if (BufferStream != default(MemoryStream))
            {
                BufferStream.Dispose();
            }
        }