Mercury
mercury_handler.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MERCURY_HANDLER_H
12 #define MERCURY_HANDLER_H
13 
14 #include "mercury_types.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
28 HG_EXPORT hg_return_t
29 HG_Handler_process(unsigned int timeout, hg_status_t *status);
30 
40 HG_EXPORT na_addr_t
42 
50 HG_EXPORT na_class_t *
52 
67 HG_EXPORT hg_return_t
68 HG_Handler_get_input(hg_handle_t handle, void *in_struct);
69 
73 HG_EXPORT hg_return_t
74 HG_Handler_free_input(hg_handle_t handle, void *in_struct);
75 
92 HG_EXPORT hg_return_t
93 HG_Handler_start_output(hg_handle_t handle, void *out_struct);
94 
102 HG_EXPORT hg_return_t
104 
105 /************ TO BE MOVED TO LOWER LAYER ***************/
106 
116 HG_EXPORT hg_return_t
117 HG_Handler_get_input_buf(hg_handle_t handle, void **in_buf,
118  size_t *in_buf_size);
119 
129 HG_EXPORT hg_return_t
130 HG_Handler_get_output_buf(hg_handle_t handle, void **out_buf,
131  size_t *out_buf_size);
132 
142 HG_EXPORT hg_return_t
143 HG_Handler_start_response(hg_handle_t handle, void *extra_out_buf,
144  size_t extra_out_buf_size);
145 
146 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 #endif /* MERCURY_HANDLER_H */
HG_EXPORT na_addr_t HG_Handler_get_addr(hg_handle_t handle)
Get abstract network address of remote caller from RPC handle.
void * na_addr_t
Definition: na.h:20
void * hg_handle_t
Definition: mercury_types.h:22
HG_EXPORT hg_return_t HG_Handler_get_input(hg_handle_t handle, void *in_struct)
Get input from handle (requires registration of input proc to deserialize parameters).
enum hg_return hg_return_t
HG_EXPORT hg_return_t HG_Handler_get_output_buf(hg_handle_t handle, void **out_buf, size_t *out_buf_size)
Get RPC output buffer from handle.
hg_bool_t hg_status_t
Definition: mercury_types.h:18
HG_EXPORT hg_return_t HG_Handler_free(hg_handle_t handle)
Release resources allocated for handling the RPC.
HG_EXPORT hg_return_t HG_Handler_get_input_buf(hg_handle_t handle, void **in_buf, size_t *in_buf_size)
Get RPC input buffer from handle.
HG_EXPORT hg_return_t HG_Handler_start_response(hg_handle_t handle, void *extra_out_buf, size_t extra_out_buf_size)
Send the response back to the caller and free handle when it completes.
HG_EXPORT na_class_t * HG_Handler_get_na_class(hg_handle_t handle)
Get NA class associated with handle.
HG_EXPORT hg_return_t HG_Handler_process(unsigned int timeout, hg_status_t *status)
Try timeout ms to process RPC requests.
HG_EXPORT hg_return_t HG_Handler_start_output(hg_handle_t handle, void *out_struct)
Start sending output from handle (requires registration of output proc to serialize parameters) This ...
HG_EXPORT hg_return_t HG_Handler_free_input(hg_handle_t handle, void *in_struct)
Free input members allocated during deserialization operation.