When the DICOM Associate connection is no longer needed, the connection should be closed. The proper steps for closing a DICOM Associate connection are as follows:
- The SCU that wishes to close the connection calls DicomNet.SendReleaseRequest. This generates a call to DicomNet.OnReceiveReleaseRequest on the SCP.
- In response to the call to DicomNet.OnReceiveReleaseRequest, the SCP calls DicomNet.SendReleaseResponse. This generates a call to DicomNet.OnReceiveReleaseResponse on the SCU.
- At this point, DicomNet.Close can be called to close the connection.
Please note that while calling DicomNet.SendAbort will also close the connection (depending on the server), the method outlined above is the preferred way.