Typedefs | |
typedef void( | example_choose_color_callback_fn )(void *conn_private, void *msg_private, struct mrpc_message *msg, mrpc_status_t status) |
Callback function for asynchronous choose_color call. | |
typedef void( | example_get_num_colors_callback_fn )(void *conn_private, void *msg_private, struct mrpc_message *msg, mrpc_status_t status, example_count *reply) |
Callback function for asynchronous get_num_colors call. | |
Functions | |
mrpc_status_t | example_choose_color (struct mrpc_connection *conn, example_color_choice *in) |
Call server's choose_color procedure and wait for a reply. | |
mrpc_status_t | example_get_num_colors (struct mrpc_connection *conn, example_count **out) |
Call server's get_num_colors procedure and wait for a reply. | |
mrpc_status_t | example_choose_color_async (struct mrpc_connection *conn, example_choose_color_callback_fn *callback, void *private, example_color_choice *in) |
Call server's choose_color procedure and fire a callback when it completes. | |
mrpc_status_t | example_get_num_colors_async (struct mrpc_connection *conn, example_get_num_colors_callback_fn *callback, void *private) |
Call server's get_num_colors procedure and fire a callback when it completes. | |
mrpc_status_t | example_crayon_selected (struct mrpc_connection *conn, example_color *in) |
Send a crayon_selected message to the server. | |
Variables | |
struct mrpc_protocol *const | example_client |
The role definition for the example client. |
typedef void( example_choose_color_callback_fn)(void *conn_private, void *msg_private, struct mrpc_message *msg, mrpc_status_t status) |
Callback function for asynchronous choose_color
call.
conn_private | The cookie for the originating connection | |
msg_private | The cookie passed to example_choose_color_async() | |
msg | An opaque handle to the reply message | |
status | The status code returned by the choose_color call |
typedef void( example_get_num_colors_callback_fn)(void *conn_private, void *msg_private, struct mrpc_message *msg, mrpc_status_t status, example_count *reply) |
Callback function for asynchronous get_num_colors
call.
conn_private | The cookie for the originating connection | |
msg_private | The cookie passed to example_get_num_colors_async() | |
msg | An opaque handle to the reply message | |
status | The status code returned by the get_num_colors call | |
reply | The Count structure returned by the get_num_colors call |
reply
is valid if status
is MINIRPC_OK, NULL otherwise. reply
is freed by miniRPC after the callback returns.
mrpc_status_t example_choose_color | ( | struct mrpc_connection * | conn, | |
example_color_choice * | in | |||
) |
Call server's choose_color
procedure and wait for a reply.
conn | The connection to use | |
in | The argument to the choose_color procedure |
in
must be allocated by the application, and may be freed by the application after the call returns.A return code of MINIRPC_OK indicates that the server completed the procedure call and returned a success code. A positive return code is a protocol-specific error returned by the server's procedure handler. A negative return code is a miniRPC error generated either by the local or remote system.
mrpc_status_t example_get_num_colors | ( | struct mrpc_connection * | conn, | |
example_count ** | out | |||
) |
Call server's get_num_colors
procedure and wait for a reply.
conn | The connection to use | |
[out] | out | The structure returned from the get_num_colors procedure |
*out
is allocated by miniRPC but must be freed by the application.
A return code of MINIRPC_OK indicates that the server completed the procedure call and returned an example_count structure in *out
. A positive return code is a protocol-specific error returned by the server's procedure handler. A negative return code is a miniRPC error generated either by the local or remote system. If the return code is not MINIRPC_OK, *out
is NULL on return.
mrpc_status_t example_choose_color_async | ( | struct mrpc_connection * | conn, | |
example_choose_color_callback_fn * | callback, | |||
void * | private, | |||
example_color_choice * | in | |||
) |
Call server's choose_color
procedure and fire a callback when it completes.
conn | The connection to use | |
callback | The function to call when the procedure completes | |
private | An application-specific cookie to be passed to the callback function | |
in | The structure parameter to be passed to the server |
choose_color
remote procedure call and returns immediately. If the return code is not MINIRPC_OK, miniRPC was unable to transmit the procedure call to the remote system.The callback function is executed from an event dispatcher; see Event Processing for details.
mrpc_status_t example_get_num_colors_async | ( | struct mrpc_connection * | conn, | |
example_get_num_colors_callback_fn * | callback, | |||
void * | private | |||
) |
Call server's get_num_colors
procedure and fire a callback when it completes.
conn | The connection to use | |
callback | The function to call when the procedure completes | |
private | An application-specific cookie to be passed to the callback function |
get_num_colors
remote procedure call and returns immediately. If the return code is not MINIRPC_OK, miniRPC was unable to transmit the procedure call to the remote system.The callback function is executed from an event dispatcher; see Event Processing for details.
mrpc_status_t example_crayon_selected | ( | struct mrpc_connection * | conn, | |
example_color * | in | |||
) |
Send a crayon_selected
message to the server.
conn | The connection to use | |
in | The data to be included in the crayon_selected message |
in
must be allocated by the application, and may be freed by the application after the call returns.
A return code of MINIRPC_OK indicates that the message was successfully queued for transmission. It does not indicate that the message has left the local system or that the message was received by the server. Because crayon_selected
is not defined as a procedure call in the protocol definition, the server has no opportunity to respond to the message.