rabbitmq-c  0.5.3
C AMQP Client library for RabbitMQ
Functions
amqp_websocket.h File Reference

Go to the source code of this file.

Functions

amqp_socket_t * amqp_websocket_new (amqp_connection_state_t state)
 Creates a new amqp_socket_t object.
websocket_tamqp_websocket_get (amqp_socket_t *self)
 Returns the pointer to underlying kws_websocket_t object.
int amqp_websocket_open (amqp_socket_t *self, const char *url)
 Open a WebSocket connection.

Detailed Description


Function Documentation

websocket_t* amqp_websocket_get ( amqp_socket_t *  self)

Returns the pointer to underlying kws_websocket_t object.

Returns:
A kws_websocket_t object pointer.
amqp_socket_t* amqp_websocket_new ( amqp_connection_state_t  state)

Creates a new amqp_socket_t object.

The amqp_socket_t is the abstract base structure that encapsulates the underlying transport layer based on the API used to create it. The underlying transport used is this case is WebSocket. The function should be called after allocating and initializing a new amqp_connection_state_t object via amqp_new_connection()

Returns:
A new socket object or NULL if an error occurred.
int amqp_websocket_open ( amqp_socket_t *  self,
const char *  url 
)

Open a WebSocket connection.

This function establishes the WebSocket connection to enable AMQP messaging over the WebSocket connection.

This function should be called after initializing connection using amqp_new_connection() and creating a WebSocket object using amqp_websocket_new().

Parameters:
[in,out]selfA socket object.
[in]urlA connection url. The url is comprised of <scheme>://<host>[:port]/[path] For example: ws://localhost:8001/amqp. For secure connection use wss as a scheme.
Returns:
AMQP_STATUS_OK on success, an amqp_status_enum on failure.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines