Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
PUT_SERVERCLASS_SEND_(3) OSS Library Calls Reference Manual
tag (Optional) If provided, is ignored. This parameter is provided for compatibility
with the Guardian SERVERCLASS_SEND_ procedure.
Output
messagebuffer On successful completion of the send, contains the reply returned by the server
process.
actualreplybytes
(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.
scsoperationnumber
(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 a thread) interface. Three optional parameters (flags, scsoperationnumber,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).
PUT_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); PUT_SERVERCLASS_SEND_INFO_( ) will show Pathsend error 918
(FEScSend-OperationAborted) and Guardian file-system error 40.
The messagebuffer 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;
PUT_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 PUT_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.
If PUT_SERVERCLASS_SEND_( ) is called while the thread has a current transaction, the
transaction identifier is propagated to the server class process. If the send is to a server class
configured with the TMF parameter OFF, then the send finishes with return error 233 (FEScEr-
ror) and PUT_SERVERCLASS_SEND_INFO_( ) will show Pathsend error 917
5−114 Hewlett-Packard Company 527187-017