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

SendReleaseRequest() public method

Method to send an association release request. this method can only be used by clients.
public SendReleaseRequest ( ) : void
return void
        public void SendReleaseRequest()
        {
            if (State != DicomAssociationState.Sta6_AssociationEstablished)
            {
                Platform.Log(LogLevel.Error, "Unexpected attempt to send Release Request when in invalid state.");
                return;
            }

            var pdu = new AReleaseRQ();

            EnqueuePdu(pdu.Write());

            State = DicomAssociationState.Sta7_AwaitingAReleaseRP;

            // still waiting for remote AE to send release response
            if (AssociationReleasing != null)
                AssociationReleasing(_assoc);
        }