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

Multiple Connections Scenario

Page 59 highlights

Figure 4-1 Programming Guide 5. Managing Multiple Connections packets and is waiting for the release indication (A_RELEASE_IND) while endpoint D is in AP_IDLE state waiting for the connection indication (A_ASSOC_IND). Multiple Connections Scenario Initiator Process Responder Process servicing servicing Conn B .sent A_ASSOC_REQ .waiting for A_ASSOC_CNF Conn A .sent all data packets .waiting for its turn to receive its last data packet before it sends A_RELEASE_REQ Conn C .sent all data packets .waiting for A_RELEASE_IND Conn D .in IDLE state .waiting for A_ASSOC_IND • If the connections are using synchronous mode, a deadlock situation occurs. Endpoint A is blocked until endpoint B receives a A_ASSOC_CNF which will never happen, because the remote process is servicing endpoint C which is waiting for A_RELEASE_REQ sent by endpoint A and endpoint A is blocked. • On the other hand, using asynchronous mode, ap_rcv() will return AP_AGAIN on communication endpoint B because there is no data to process. It would not block the process, and the application can continue to service the next connection. Communication endpoint A would then be able to receive its last data packet and send a release request (A_RELEASE_REQ) to endpoint C. Then C would be able to process its release indication (A_RELEASE_IND) and reply (A_RELEASE_RSP). Endpoint D would receive its connection indication (A_ASSOC_IND) and so on. For more information on how an application can handle synchronous and asynchronous mode processing, see the section "Using Synchronous vs. Asynchronous Mode.". Chapter 4 59

  • 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

Chapter 4
59
Programming Guide
5. Managing Multiple Connections
packets and is waiting for the release indication (A_RELEASE_IND)
while endpoint D is in AP_IDLE state waiting for the connection
indication (A_ASSOC_IND).
Figure 4-1
Multiple Connections Scenario
If the connections are using synchronous mode, a deadlock situation
occurs. Endpoint A is blocked until endpoint B receives a
A_ASSOC_CNF which will never happen, because the remote process
is servicing endpoint C which is waiting for A_RELEASE_REQ sent
by endpoint A and endpoint A is blocked.
On the other hand, using asynchronous mode, ap_rcv() will return
AP_AGAIN on communication endpoint B because there is no data to
process. It would not block the process, and the application can
continue to service the next connection. Communication endpoint A
would then be able to receive its last data packet and send a release
request (A_RELEASE_REQ) to endpoint C. Then C would be able to
process its release indication (A_RELEASE_IND) and reply
(A_RELEASE_RSP). Endpoint D would receive its connection
indication (A_ASSOC_IND) and so on.
For more information on how an application can handle synchronous and
asynchronous mode processing, see the section “Using Synchronous vs.
Asynchronous Mode.”.
Initiator Process
Responder Process
====================================================
servicing
servicing
Conn B
Conn C
.sent A_ASSOC_REQ
.waiting for
A_ASSOC_CNF
.sent all data packets
.waiting for
A_RELEASE_IND
Conn A
.sent all data packets
.waiting for its turn
to receive its last
data packet before
it sends A_RELEASE_REQ
Conn D
.in IDLE state
.waiting for
A_ASSOC_IND