beautypg.com

3 blocking and nonblocking usage – Compaq TP DESKTOP CONNECTOR AAPVNFGTE User Manual

Page 54

background image

3.3 Blocking and Nonblocking Usage

Like the portable TP Desktop Connector client services, presentation
procedures can be either blocking or nonblocking. If the desktop client
program supplies the completion_routine parameter in the acmsdi_call_task
call, the service behaves in the nonblocking environment (see Section 2.3). In
a nonblocking environment, presentation procedures must behave in a way
consistent with nonblocking services.

3.3.1 Presentation Procedures in a Nonblocking Environment

When nonblocking services are in use, presentation procedures are written in
two parts:

The first part handles the generic presentation procedure and dispatches to
the application-specific presentation procedure to handle interaction with
the user.

The second part uses the acmsdi_complete_pp service to indicate that
exchange step processing is completed.

The TP Desktop Connector client services return exchange step data and
status to the TP Desktop Connector gateway when the desktop client program
calls the acmsdi_complete_pp service.

3.3.2 Nonblocking and Blocking Restriction

All calls using the same desktop client program and TP Desktop Connector
gateway connection must be either blocking, nonblocking, or forced
nonblocking. These types of service calls cannot be mixed for a client/server
pair. If a desktop client program connects to two different TP Desktop
Connector gateways, it can mix service call types, using blocking calls to
interact with one gateway and nonblocking calls to interact with the other
gateway.

3–4 Portable API Presentation Procedures