ClearCanvas.Dicom.Network.NetworkBase.Abort C# (CSharp) Method

Abort() public method

Force a shutdown of the DICOM connection.

This routine will force the network connection for the DicomClient or DicomServerto be closed and the background thread for processing the association to shutdown. The routine will block for the number of milliseconds specified by .

Note, for a graceful shutdown the SendAssociateAbort or SendReleaseRequest methods should be called. These routines will gracefully shutdown DICOM connections. The DicomClient.Join() method can then be called to wait for the background thread to clean up.

public Abort ( int millisecondTimeout ) : void
millisecondTimeout int
return void
		public void Abort(int millisecondTimeout)
		{
			try
			{
				if (State != DicomAssociationState.Sta1_Idle
				 && State != DicomAssociationState.Sta13_AwaitingTransportConnectionClose
                 && _network != null)
					SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified);
			}
			finally
			{
				CloseNetwork(millisecondTimeout);
			}
		}

Same methods

NetworkBase::Abort ( ) : void