ACSE/Presentation and ROSE Interface Programmer's Guide

42 Chapter 3
Using ACSE/Presentation
Step 4: Release the Association
Step 4: Release the Association
Processes must cooperate to ensure that no data is lost when the
association is released. This can be accomplished by requesting a release,
accepting the release, then terminating the association.
Requesting the Release
After Process A has completed sending user data, it sends a release
request to Process B using ap_snd() with the A_RELEASE_REQ
primitive (Figure 9).
Process B uses ap_poll() to monitor events, and calls ap_rcv() to receive
the release request.
Figure 3-9 Release Request
Confirm the Release Request
Process B accepts the request and sends a positive response using the
ap_snd() call with the A_RELEASE_RSP primitive (Figure 3-10).
Communication
Communication
Endpoint A
Endpoint B
Process A
Process B
AP Environment A AP Environment B
Initiator
Responder
ap_snd()
ap_poll()
ap_rcv()
release request