+/** @brief Launch a RPC call, but do not block for the answer */
+gras_msg_cb_ctx_t
+gras_msg_rpc_async_call_(xbt_socket_t server,
+ double timeOut,
+ gras_msgtype_t msgtype, void *request)
+{
+ gras_msg_cb_ctx_t ctx = xbt_mallocator_get(gras_msg_ctx_mallocator);
+
+ if (msgtype->ctn_type) {
+ xbt_assert(request,
+ "RPC type '%s' convey a payload you must provide",
+ msgtype->name);
+ } else {
+ xbt_assert(!request,
+ "No payload was declared for RPC type '%s'",
+ msgtype->name);
+ }
+
+ ctx->ID = last_msg_ID++;
+ ctx->expeditor = server;
+ ctx->msgtype = msgtype;
+ ctx->timeout = timeOut;
+
+ XBT_VERB("Send to %s:%d a RPC of type '%s' (ID=%lu)",
+ xbt_socket_peer_name(server),
+ xbt_socket_peer_port(server), msgtype->name, ctx->ID);
+
+ gras_msg_send_ext(server, e_gras_msg_kind_rpccall, ctx->ID, msgtype,
+ request);
+
+ return ctx;
+}
+
+/** @brief Wait the answer of a RPC call previously launched asynchronously */
+void gras_msg_rpc_async_wait(gras_msg_cb_ctx_t ctx, void *answer)
+{
+ xbt_ex_t e;