public void Close() { prepare(); if (_request.GetResponse() == null) { OutboundStream.Close(); } _request.GetResponse().Close(); }
/// <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); } }