Function amqp_simple_rpc

Synopsis

#include <librabbitmq/amqp.h>

amqp_rpc_reply_t amqp_simple_rpc(amqp_connection_state_t state, amqp_channel_t channel, amqp_method_number_t request_id, amqp_method_number_t *expected_reply_ids, void *decoded_request_method)

Description

Sends a method to the broker and waits for a method response

Parameters:

[ in ] state - the connection object

[ in ] channel - the channel object

[ in ] request_id - the method number of the request

[ in ] expected_reply_ids - a 0 terminated array of expected response method numbers

[ in ] decoded_request_method - the method to be sent to the broker

Return
a amqp_rpc_reply_t:
See
amqp_simple_rpc_decoded()
Since
v0.1

Source

Lines 1122-1137 in librabbitmq/amqp_socket.c. Line 1665 in librabbitmq/amqp.h.

amqp_rpc_reply_t amqp_simple_rpc(amqp_connection_state_t state,
                                 amqp_channel_t channel,
                                 amqp_method_number_t request_id,
                                 amqp_method_number_t *expected_reply_ids,
                                 void *decoded_request_method) {
  amqp_time_t deadline;
  int res;

  res = amqp_time_from_now(&deadline, state->rpc_timeout);
  if (res != AMQP_STATUS_OK) {
    return amqp_rpc_reply_error(res);
  }

  return simple_rpc_inner(state, channel, request_id, expected_reply_ids,
                          decoded_request_method, deadline);
}


Discussions (1)

  • #2
  • Replied Feb. 26, 2020 by
  • 1



Add Discussion as Guest

Log in to DocsForge