Example #1
0
 public void Close()
 {
     prepare();
     if (_request.GetResponse() == null)
     {
         OutboundStream.Close();
     }
     _request.GetResponse().Close();
 }
Example #2
0
 /// <summary> Closes streams and underlying socket. </summary>
 /// <seealso cref="Genetibase.NuGenHL7.protocol.StreamSource.disconnect()">
 /// </seealso>
 public virtual void  disconnect()
 {
     try
     {
         if (Connected)
         {
             OutboundStream.Close();
             InboundStream.Close();
             getSocket().Close();
         }
     }
     catch (System.IO.IOException e)
     {
         throw new NuGenTransportException(e);
     }
 }