If a message's handler is set to NULL, the message will be dropped and (if possible) MINIRPC_PROCEDURE_UNAVAIL will be returned to the sender.
Data Fields | |
| mrpc_status_t(* | choose_color )(void *conn_data, struct mrpc_message *msg, example_color_choice *in) |
Handler for choose_color procedure. | |
| mrpc_status_t(* | get_num_colors )(void *conn_data, struct mrpc_message *msg, example_count *out) |
Handler for get_num_colors procedure. | |
| void(* | crayon_selected )(void *conn_data, struct mrpc_message *msg, example_color *in) |
Handler for crayon_selected message. | |
| mrpc_status_t(* choose_color)(void *conn_data, struct mrpc_message *msg, example_color_choice *in) |
Handler for choose_color procedure.
| conn_data | The cookie for the originating connection | |
| msg | An opaque handle to the request message | |
| in | The procedure parameter received from the remote system |
in will be freed by miniRPC once the handler returns. This will occur whether or not the handler returns MINIRPC_PENDING.
| mrpc_status_t(* get_num_colors)(void *conn_data, struct mrpc_message *msg, example_count *out) |
Handler for get_num_colors procedure.
| conn_data | The cookie for the originating connection | |
| msg | An opaque handle to the request message | |
| [out] | out | The procedure parameter to be returned to the remote system |
out will be returned to the remote system immediately. If it returns a non-zero error code other than MINIRPC_PENDING, that status code will be returned to the remote system and the contents of out will be discarded. If it returns MINIRPC_PENDING, no immediate reply will be made. At its convenience, the application can then call example_get_num_colors_send_async_reply() to return MINIRPC_OK and an example_count structure, or example_get_num_colors_send_async_reply_error() to return an error code.
out is pre-allocated and should be filled in by the handler. It will be freed once the handler returns, even if the handler returns MINIRPC_PENDING; the application will need to allocate its own example_count if it later wants to send an asynchronous reply.
| void(* crayon_selected)(void *conn_data, struct mrpc_message *msg, example_color *in) |
Handler for crayon_selected message.
| conn_data | The cookie for the originating connection | |
| msg | An opaque handle to the request message | |
| in | The procedure parameter received from the remote system |
in will be freed once the handler returns.