next up previous contents
Next: 8.12 fluke_ipc_setup_wait_receive: set up Up: 8 Interprocess Communication Previous: 8.10 fluke_ipc_server_ack_send_wait_receive: reply to

8.11 fluke_ipc_server_send_wait_receive: send data to a reliable IPC connection, disconnect and wait for a new invocation

SYNOPSIS

fluke_error_t fluke_ipc_server_send_wait_receive( fluke_ipc_params_t *params, void **port_alias);

DESCRIPTION

This function is a combination of fluke_ipc_server_send and fluke_ipc_wait_receive. It sends data on a reliable connection, disconnects, and returns to wait for and receive incoming IPCs on the previously established port set.

PARAMETERS

params
A pointer to a structure describing data and references to send, and the buffers and references to receive the response into. Only the receive parameter fields are modified by the call.
port_alias
When an incoming IPC request is successfully received, this pointer is set to the port alias attached to the port through which the IPC invocation was made, allowing the server to distinguish requests to different ports that are attached to a single port set.

RETURNS

Returns one of the following codes: All of these have an implicit FLUKE_ prefix.
SUCCESS
All of the specified data was sent successfully (though not necessarily delivered to the final receiver) and a new message received. For a reliable invocation, an IPC connection was established, and the entire initial message from the client was received into the the server's receive buffers and references. For oneway or idempotent invocations, either the entire message or as much as would fit in the server's buffers was received. For all cases, the ipc_params structure is updated appropriately to indicate the amount of data and references received.
IPC_SEND_DISCONNECTED
The IPC connection on which the transfer is to take place does not exist, or has been broken for some reason, such as by the receiver being terminated.
IPC_RECV_MORE_DATA
A reliable IPC connection was established, but all of the server's data buffers filled up before the client finished sending its first message. The server must make more room for incoming data and call fluke_ipc_server_receive to receive it. The ipc_params structure is updated appropriately to indicate the number of references received.
IPC_RECV_MORE_REFS
A reliable IPC connection was established, but all of the server's references were filled before the client finished sending its first message. The server must make room for more references and call fluke_ipc_server_receive to receive it. The ipc_params structure is updated appropriately to indicate the amount of data received.
IPC_RECV_DISCONNECTED
A reliable IPC connection was established, but the sender disconnected after sending some data but before the receiver's buffers filled up. The ipc_params structure is updated appropriately to indicate the amount of data and references received.
IPC_WAIT_ONEWAY
A one-way message was received. The caller merely needs to process the message and then wait for more messages if appropriate; no response of any kind is required.
IPC_WAIT_IDEMPOTENT
An idempotent message was received. The caller should process the message and then reply to it using fluke_ipc_reply.

ERRORS

If any of the following errors is detected by the Fluke implementation, it causes the current thread to take a synchronous exception with one of the following codes. All of these have an implicit FLUKE_INSANITY_ prefix.
NO_OBJECT
A pointer in the ipc_params send reference array does not refer to an active object.
NOT_REF
An object in the ipc_params send reference array is not a reference object.
INVALID_OBJECT
The state of an object in the ipc_params send reference array is invalid.
BUFFER_UNALIGNED
A message buffer was not aligned properly according to the architecture-specific requirements.

RELATED INFORMATION

fluke_ipc_side_send, fluke_ipc_client_connect_send_over_receive, fluke_ipc_call, fluke_ipc_reply, fluke_ipc_wait_receive


next up previous contents
Next: 8.12 fluke_ipc_setup_wait_receive: set up Up: 8 Interprocess Communication Previous: 8.10 fluke_ipc_server_ack_send_wait_receive: reply to

Utah Flux Research Group