TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)

Pathsend Procedure Call Reference
NonStop TS/MP Pathsend and Server Programming Manual132500
5-28
Timeout Considerations for Pathsend Programming
Nowait server-class send operations are completed with a call to AWAITIOX. The
timeout considerations for nowait operations are more complex, because a time-limit
parameter can also be set in the AWAITIOX call. The error returned by AWAITIOX
depends on which time limit was reached:
If a timeout value is specified in a nowait call to SERVERCLASS_SEND_,
SERVERCLASS_DIALOG_BEGIN_, or SERVERCLASS_DIALOG_SEND_ and
the request is not completed within the specified time, the AWAITIOX call returns
error 233, and a subsequent call to SERVERCLASS_SEND_INFO_ returns
Pathsend error 918 (FeScSendOperationAborted) and file-system error 40
(FETimedOut).
If a time-limit value is specified in the call to AWAITIOX and this time limit is
reached, the AWAITIOX call returns file-system error 40 (FETimedOut).
If you use a time-limit value on AWAITIOX to wait on I/O operations other than the
Pathsend calls SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_, and
SERVERCLASS_DIALOG_SEND_ (for example, WRITEREAD calls, which do not
provide a timeout parameter) and you also use a timeout value on the Pathsend calls,
timeouts can occur in one of the preceding two ways, depending on which timer expires
first. To avoid this complex error handling, it is recommended that you use a timeout
value only on the AWAITIOX call.
For programs whose only I/O operations are Pathsend procedure calls, it is not useful to
use both a timeout on the Pathsend procedure calls and a time limit on AWAITIOX,
because you would be timing the same operation twice. In this case, choose either
Pathsend timeouts or AWAITIOX time limits.
When an AWAITIOX time limit is reached, whether an I/O operation is canceled
depends on the filenum parameter used in the AWAITIOX call. If filenum is set
equal to scsend-op-num and the AWAITIOX time-limit value is greater than zero,
the oldest outstanding send operation is canceled. Iffilenum is set to-1 or if the
AWAITIOX time-limit value is zero or less, no operation is canceled. When a Pathsend
timeout is reached, no send operation is canceled regardless of parameter settings.
Note that any time a send is canceled, the current TMF transaction, if any, is
automatically aborted. Any time a send timeout occurs when an I/O operation is
outstanding on a server process, the I/O operation to the server is canceled and the
transaction, if any, is aborted. However, you should code the requester to call the
ABORTTRANSACTION procedure so that the appropriate cleanup is done on the
requester’s side.