示例#1
0
 /// <summary>
 /// Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
 /// </summary>
 public override void Close()
 {
     try
     {
         base.Close();
         m_in.Close();
         m_out.Close();
         m_channel.close();
         m_session.disconnect();
     }
     catch {}
 }
示例#2
0
        /// <summary>
        /// Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
        /// </summary>
        /// <param name="closeSession">True will close the underlying session</param>
        public virtual void Close(bool closeSession)
        {
            try
            {
                base.Close();
                m_in.Close();
                m_out.Close();
                m_channel.close();
                m_channel.disconnect();

                if (closeSession)
                {
                    m_session.disconnect();
                }
            }
            catch
            {
            }
        }