Sending and Receiving Messages

Once an ISCL connection has been established, the client and the server are ready to start transferring messages and data. The data transferred may be secured or unsecured. To send unsecured messages, the user should use the LDicomNet::SendNonSecureISCL function. When this function is called, it generates a call to the LDicomNet::OnNonSecureSendISCL function on the sender's machine. Upon receiving non secured data, a call to the LDicomNet::OnNonSecureReceivedISCL function is generated on the receiver's machine.

Use the LDicomNet::SetMaxMessageLengthISCL method function to set the maximum message length that can be processed.

For information about confidentiality and data integrity associated with sending secured messages, refer to Adding Security to a DICOM Connection.

Since encryption modes, message authentication codes, authorization data and message length must all match between a sender and a receiver, occasionally, a sender will send a message that is not received properly by the receiver. When this happens, the receiver, not the sender, can get information about the problems that caused the failure. LEADTOOLS provides the following functions to help the user locate the cause of the problem:

LDicomNet::GetPeerAuthDataISCL

LDicomNet::GetPeerEncryptionISCL

LDicomNet::GetPeerMACISCL

LDicomNet::GetPeerRequestedMessageLengthISCL

In addition, when errors occur, the LDicomNet::GetErrorSecure and LDicomNet::GetStatusISCL can be used to help determine the location of the problem.