Qpid Proton C API 0.40.0
 
Loading...
Searching...
No Matches
connection_driver.h File Reference

Unsettled API - An API for low-level IO integration. More...

#include <proton/annotations.h>
#include <proton/import_export.h>
#include <proton/event.h>
#include <proton/types.h>
#include <stdarg.h>

Go to the source code of this file.

Classes

struct  pn_connection_driver_t
 The elements needed to drive AMQP IO and events. More...
 

Macros

#define PN_TRANSPORT_WRITE_CLOSED
 The write side of the transport is closed, it will no longer produce bytes to write to external IO.
 
#define PN_TRANSPORT_READ_CLOSED
 The read side of the transport is closed, it will no longer read bytes from external IO.
 

Functions

int pn_connection_driver_init (pn_connection_driver_t *, pn_connection_t *, pn_transport_t *)
 Set connection and transport to the provided values, or create a new pn_connection_t or pn_transport_t if either is NULL.
 
int pn_connection_driver_bind (pn_connection_driver_t *d)
 Force binding of the transport.
 
void pn_connection_driver_destroy (pn_connection_driver_t *)
 Unbind, release and free the connection and transport.
 
pn_connection_tpn_connection_driver_release_connection (pn_connection_driver_t *d)
 Disassociate the driver's connection from its transport and collector and sets d->connection = NULL.
 
pn_rwbytes_t pn_connection_driver_read_buffer_sized (pn_connection_driver_t *, size_t n)
 Try to get a read buffer with the specified size.
 
pn_rwbytes_t pn_connection_driver_read_buffer (pn_connection_driver_t *)
 Get the read buffer.
 
void pn_connection_driver_read_done (pn_connection_driver_t *, size_t n)
 Process the first n bytes of data in pn_connection_driver_read_buffer() and reclaim the buffer space.
 
void pn_connection_driver_read_close (pn_connection_driver_t *)
 Close the read side.
 
bool pn_connection_driver_read_closed (pn_connection_driver_t *)
 True if read side is closed.
 
pn_bytes_t pn_connection_driver_write_buffer (pn_connection_driver_t *)
 Get the write buffer.
 
pn_bytes_t pn_connection_driver_write_done (pn_connection_driver_t *, size_t n)
 Call when the first n bytes of pn_connection_driver_write_buffer() have been written to IO.
 
void pn_connection_driver_write_close (pn_connection_driver_t *)
 Close the write side.
 
bool pn_connection_driver_write_closed (pn_connection_driver_t *)
 True if write side is closed.
 
void pn_connection_driver_close (pn_connection_driver_t *c)
 Close both sides.
 
pn_event_tpn_connection_driver_next_event (pn_connection_driver_t *)
 Get the next event to handle.
 
bool pn_connection_driver_has_event (pn_connection_driver_t *)
 True if pn_connection_driver_next_event() will return a non-NULL event.
 
bool pn_connection_driver_finished (pn_connection_driver_t *)
 Return true if the the driver is closed for reading and writing and there are no more events.
 
void pn_connection_driver_errorf (pn_connection_driver_t *d, const char *name, PN_PRINTF_FORMAT const char *fmt,...) PN_PRINTF_FORMAT_ATTR(3
 Set transport error.
 
void void pn_connection_driver_verrorf (pn_connection_driver_t *d, const char *name, const char *fmt, va_list)
 Set transport error via a va_list, see pn_connection_driver_errorf()
 
void pn_connection_driver_log (pn_connection_driver_t *d, const char *msg)
 Deprecated - Use pn_transport_log().
 
void pn_connection_driver_logf (pn_connection_driver_t *d, PN_PRINTF_FORMAT const char *fmt,...) PN_PRINTF_FORMAT_ATTR(2
 Deprecated - Use pn_transport_logf().
 
void void pn_connection_driver_vlogf (pn_connection_driver_t *d, const char *fmt, va_list ap)
 Deprecated - Use pn_transport_vlogf().
 
pn_connection_driver_t ** pn_connection_driver_ptr (pn_connection_t *connection)
 Associate a pn_connection_t with its pn_connection_driver_t.
 

Detailed Description

Unsettled API - An API for low-level IO integration.