Robust Distributed System Nucleus (rDSN)
ver 1.0.0
|
Functions | |
DSN_API dsn_task_t | dsn_rpc_create_response_task (dsn_message_t request, dsn_rpc_response_handler_t cb, void *context, int reply_thread_hash DEFAULT(0), dsn_task_tracker_t tracker DEFAULT(nullptr)) |
DSN_API dsn_task_t | dsn_rpc_create_response_task_ex (dsn_message_t request, dsn_rpc_response_handler_t cb, dsn_task_cancelled_handler_t on_cancel, void *context, int reply_thread_hash DEFAULT(0), dsn_task_tracker_t tracker DEFAULT(nullptr)) |
DSN_API void | dsn_rpc_call (dsn_address_t server, dsn_task_t rpc_call) |
DSN_API dsn_message_t | dsn_rpc_call_wait (dsn_address_t server, dsn_message_t request) |
DSN_API void | dsn_rpc_call_one_way (dsn_address_t server, dsn_message_t request) |
DSN_API dsn_message_t | dsn_rpc_get_response (dsn_task_t rpc_call) |
DSN_API void | dsn_rpc_enqueue_response (dsn_task_t rpc_call, dsn_error_t err, dsn_message_t response) |
DSN_API dsn_task_t dsn_rpc_create_response_task | ( | dsn_message_t | request, |
dsn_rpc_response_handler_t | cb, | ||
void * | context, | ||
int reply_thread_hash | DEFAULT0, | ||
dsn_task_tracker_t tracker | DEFAULTnullptr | ||
) |
create a callback task to handle the response message from RPC server, or timeout.
request | rpc request message |
cb | callback to handle rpc response or timeout, unlike the other kinds of tasks, response tasks are always executed in the thread pool invoking the rpc |
context | context used by cb |
reply_thread_hash | if the curren thread pool is partitioned, this specify which thread to execute the callback |
tracker | task tracker bound to the response task |
DSN_API dsn_task_t dsn_rpc_create_response_task_ex | ( | dsn_message_t | request, |
dsn_rpc_response_handler_t | cb, | ||
dsn_task_cancelled_handler_t | on_cancel, | ||
void * | context, | ||
int reply_thread_hash | DEFAULT0, | ||
dsn_task_tracker_t tracker | DEFAULTnullptr | ||
) |
create a callback task to handle the response message from RPC server, or timeout.
request | rpc request message |
cb | callback to handle rpc response or timeout, unlike the other kinds of tasks, response tasks are always executed in the thread pool invoking the rpc |
on_cancel | callback executed on task being-cancelled |
context | context used by cb |
reply_thread_hash | if the curren thread pool is partitioned, this specify which thread to execute the callback |
tracker | task tracker bound to the response task |