Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
SPT_SERVERCLASS_SEND_(3) OSS Library Calls Reference Manual
flags (Optional) If provided, must contain 0 (zero) to indicate a waited operation.
This parameter is provided for compatibility with the Guardian
SERVERCLASS_SEND_ procedure.
tag (Optional) If provided, is ignored. This parameter is provided for compatibility
with the Guardian SERVERCLASS_SEND_ procedure.
Output
message_buffer
On successful completion of the send, contains the reply returned by the server
process.
actual_reply_len
(Optional) If provided, returns the number of bytes returned in the server pro-
cess reply and stored in the area pointed to by message_buffer.
scsend_op_num
(Optional) If provided, returns the value -1. This parameter is provided only for
compatibility with the Guardian SERVERCLASS_SEND_ procedure.
DESCRIPTION
This function is used to send a message to and receive a reply message from a server process in a
Pathway server class. The parameters and semantics of this function are the same as those of the
Guardian SERVERCLASS_SEND_ procedure, which is described in the NonStop TS/MP Path-
send and Server Programming Manual.
This function differs from the Guardian SERVERCLASS_SEND_ procedure in that it provides
only a waited (to the thread) interface. Three optional parameters (flags, scsend-op-num, and
tag) are used to specify nowait operations. These parameters should usually be omitted.
The flags parameter, if provided, must be 0 (zero). If a value other than zero is provided, the
operation fails with an error value of 233 (FEScError).
STP_SERVERCLASS_SEND_INFO_( ) will show Pathsend error 909 (FEScInvalid-
FlagsValue).
The thread is suspended for the duration of the send operation. Other threads in the process are
scheduled to run. The timeout parameter can be used to specify that the send be canceled after a
specified interval. Alternatively, pthread_cancel( ) can be used (by another thread) to cancel the
send operation in progress in a thread. The cancel exception generated by pthread_cancel( ) can
be subsequently handled by the thread. As with the CANCEL and SERVERCLASS_SEND_
Guardian procedures, the program cannot determine whether the canceled message was sent or
canceled before the server process finished processing the request. If the send is canceled
because of expiration of the timeout parameter, then the function returns with an error value of
233 (FEScError); SPT_SERVERCLASS_SEND_INFO_( ) will show Pathsend error 918
(FEScSend-OperationAborted) and Guardian file-system error 40.
The message_buffer parameter should refer to static or heap-allocated storage. It should not be
automatic storage and should not be stack-allocated storage for a TNS process. If stack-allocated
storage for a TNS process is specified, an error value 233 (FEScError) is returned;
SPT_SERVERCLASS_SEND_INFO_( ) will show Pathsend error 912 (FEScParameter-
BoundsError).
The message buffer is modified by the server reply. Therefore, the same buffer area should not
be used concurrently by more than one thread. The threads package does not check for this con-
dition; it is the responsibility of the programmer who is using threads.
Multiple SPT_SERVERCLASS_SEND_( ) operations can be in progress in different threads
within a process. The maximum number of concurrent calls is determined by the number of
threads and the Pathsend limit of 512 for each LINKMON.
6−108 Hewlett-Packard Company 527187-017