Function amqp_socket_open

Synopsis

#include <librabbitmq/amqp.h>

int amqp_socket_open(amqp_socket_t *self, const char *host, int port)

Description

Open a socket connection.

This function opens a socket connection returned from amqp_tcp_socket_new() or amqp_ssl_socket_new(). This function should be called after setting socket options and prior to assigning the socket to an AMQP connection with amqp_set_socket().

Parameters:

[ in,out ] self - A socket object.

[ in ] host - Connect to this host.

[ in ] port - Connect on this remote port.

Return
AMQP_STATUS_OK on success, an amqp_status_enum on failure
Since
v0.4.0

Mentioned in

Source

Lines 135-139 in librabbitmq/amqp_socket.c. Line 2347 in librabbitmq/amqp.h.

int amqp_socket_open(amqp_socket_t *self, const char *host, int port) {
  assert(self);
  assert(self->klass->open);
  return self->klass->open(self, host, port, NULL);
}





Add Discussion as Guest

Log in to DocsForge