HP 800 ACSE/Presentation and ROSE Interface Programmer's Guide - Page 44

Step 5: Closing the Communication, Endpoint

Page 44 highlights

Using ACSE/Presentation Step 5: Closing the Communication Endpoint CAUTION Figure 3-11 Step 5: Closing the Communication Endpoint Finally, both processes use ap_close() to close down the communication endpoint (file descriptor) and A/P environment resources (see Figure 3-11). If the association is still alive when ap_close() is invoked, the association will be aborted by the provider before the communication endpoint is released. When an association is terminated, you can re-use the communication endpoint for a new association. ap_close() is used when there is no further use for the communication endpoint. Resources allocated upon the initial ap_open() will not be released unless an explicit ap_close() call is made for each endpoint or the process is terminated. Close the Association Process A Process B AP Environment A ap_close() ap_close() AP Environment B Initiator Communication Endpoint A 44 Responder Communication Endpoint B Chapter 3

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109

44
Chapter 3
Using ACSE/Presentation
Step 5: Closing the Communication Endpoint
Step 5: Closing the Communication
Endpoint
Finally, both processes use ap_close() to close down the communication
endpoint (file descriptor) and A/P environment resources (see Figure
3-11). If the association is still alive when ap_close() is invoked, the
association will be aborted by the provider before the communication
endpoint is released.
When an association is terminated, you can re-use the communication
endpoint for a new association. ap_close() is used when there is no
further use for the communication endpoint.
CAUTION
Resources allocated upon the initial ap_open() will not be released unless
an explicit ap_close() call is made for each endpoint or the process is
terminated.
Figure 3-11
Close the Association
Communication
Communication
Endpoint A
Endpoint B
Process A
Process B
AP Environment A
AP Environment B
Initiator
Responder
ap_close()
ap_close()