Explorar o código

core: rpc - adding rpc_cb_ctx_t

 - rpc_cb_ctx_t is a convenient way of packing an rpc
    callback (rpc_function_t) parameters and it's not
    used/needed by the rpc api/interface.
Ovidiu Sas %!s(int64=15) %!d(string=hai) anos
pai
achega
e5e03e8589
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      rpc.h

+ 12 - 0
rpc.h

@@ -95,6 +95,18 @@ typedef struct rpc_delayed_ctx{
 
 typedef void (*rpc_function_t)(rpc_t* rpc, void* ctx);
 
+/*
+ * RPC callback context.
+ *
+ * Defines a convenient way of packing an rpc callback
+ * (rpc_function_t) parameters and it's not used/needed
+ * by the rpc api/interface.
+ */
+typedef struct rpc_cb_ctx {
+	rpc_t *rpc;
+	void *c;
+} rpc_cb_ctx_t;
+
 
 /*
  * Remote Procedure Call Export