fluke_error_t fluke_ipc_server_ack_send_wait_receive( fluke_ipc_params_t *params, void **port_alias);
This function is a combination of fluke_ipc_server_ack_send and fluke_ipc_wait_receive. It replies to the current reliable client request, disconnects and waits for a new request on the previously established port set. This call is the main server-side interface for reliable RPC mechanisms. Each service thread typically performs an initial fluke_ipc_setup_wait_receive to setup IPC parameters and receive the first request and then loops calling fluke_ipc_server_ack_send_wait_receive to reply to that request and get a new one.
- 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 one of the following codes: All of these have an implicit FLUKE_ prefix.
- SUCCESS
- The reply message was successfully send and, 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_ACK_DISCONNECTED
- The IPC connection does not exist, or was broken unexpectedly for some reason before the connection reversal actually took place, e.g. because the other side disconnected or was terminated.
- IPC_SEND_DISCONNECTED
- The connection was reversed successfully, but the receiver disconnected afterwards before the message was completely sent.
- 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 were filled. 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.
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.
fluke_ipc_setup_wait_receive, fluke_ipc_client_connect_send_over_receive, fluke_ipc_call, fluke_ipc_reply, fluke_ipc_wait_receive