diff options
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r-- | librabbitmq/amqp.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h index de6eda3..6adabe0 100644 --- a/librabbitmq/amqp.h +++ b/librabbitmq/amqp.h @@ -666,6 +666,26 @@ AMQP_CALL amqp_socket_open(amqp_socket_t *self, const char *host, int port); /** + * 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(). + * + * \param [in,out] self A socket object. + * \param [in] host Connect to this host. + * \param [in] port Connect on this remote port. + * \param [in] timeout Max allowed time to spent on opening. If NULL - run in blocking mode + * + * \return Zero upon success, non-zero otherwise. + */ +AMQP_PUBLIC_FUNCTION +int +AMQP_CALL +amqp_socket_open_noblock(amqp_socket_t *self, const char *host, int port, struct timeval *timeout); + +/** * Get the socket descriptor in use by a socket object. * * Retrieve the underlying socket descriptor. This function can be used to |