1 #ifndef PROTON_CONNECTION_ENGINE_H 2 #define PROTON_CONNECTION_ENGINE_H 193 #endif // PROTON_CONNECTION_ENGINE_H PN_EXTERN pn_cbuf_t pn_connection_engine_write_buffer(pn_connection_engine_t *)
The engine's write buffer.
pn_event_t * event
Definition: connection_engine.h:98
PN_EXTERN pn_connection_t * pn_connection_engine_connection(pn_connection_engine_t *)
Get the AMQP connection, owned by the pn_connection_engine_t.
struct pn_cbuf_t pn_cbuf_t
A read-only memory buffer.
PN_EXTERN pn_condition_t * pn_connection_engine_condition(pn_connection_engine_t *)
Get the condition object for the engine's transport.
struct pn_transport_t pn_transport_t
An AMQP Transport object.
Definition: types.h:262
PN_EXTERN void pn_connection_engine_disconnected(pn_connection_engine_t *)
Close both sides of the transport, equivalent to pn_connection_engine_read_close(); pn_connection_eng...
PN_EXTERN pn_buf_t pn_connection_engine_read_buffer(pn_connection_engine_t *)
The engine's read buffer.
struct pn_connection_engine_t pn_connection_engine_t
A connection engine is a trio of pn_connection_t, pn_transport_t and pn_collector_t.
PN_EXTERN void pn_connection_engine_read_close(pn_connection_engine_t *)
Close the read side of the transport when no more data is available.
PN_EXTERN void pn_connection_engine_read_done(pn_connection_engine_t *, size_t n)
Consume the first n bytes of data in pn_connection_engine_read_buffer() and update the buffer...
PN_EXTERN pn_buf_t pn_buf(char *data, size_t size)
Create a pn_buf.
#define PN_EXTERN
Definition: import_export.h:53
struct pn_collector_t pn_collector_t
An event collector.
Definition: types.h:250
struct pn_buf_t pn_buf_t
A modifiable memory buffer.
The Condition API for the proton Engine.
char * data
Beginning of the buffered data.
Definition: connection_engine.h:73
PN_EXTERN pn_transport_t * pn_connection_engine_transport(pn_connection_engine_t *)
Get the proton transport, owned by the pn_connection_engine_t.
PN_EXTERN void pn_connection_engine_write_done(pn_connection_engine_t *, size_t n)
Call when the first n bytes of pn_connection_engine_write_buffer() have been written to IO and can be...
size_t size
Number of bytes in the buffer.
Definition: connection_engine.h:83
PN_EXTERN void pn_connection_engine_write_close(pn_connection_engine_t *)
Call when the write side of IO has closed and no more data can be written.
PN_EXTERN bool pn_connection_engine_finished(pn_connection_engine_t *)
Return true if the engine is finished - all data has been written, all events have been handled and t...
A modifiable memory buffer.
Definition: connection_engine.h:72
pn_connection_t * connection
Definition: connection_engine.h:95
PN_EXTERN pn_event_t * pn_connection_engine_dispatch(pn_connection_engine_t *)
Get the next available event.
A connection engine is a trio of pn_connection_t, pn_transport_t and pn_collector_t.
Definition: connection_engine.h:94
pn_collector_t * collector
Definition: connection_engine.h:97
Event API for the proton Engine.
PN_EXTERN int pn_connection_engine_init(pn_connection_engine_t *engine)
Initialize a pn_connection_engine_t struct with a new connection, transport and collector.
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:118
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
PN_EXTERN pn_cbuf_t pn_cbuf(const char *data, size_t size)
Create a pn_cbuf.
pn_transport_t * transport
Definition: connection_engine.h:96
PN_EXTERN void pn_connection_engine_final(pn_connection_engine_t *engine)
Release the connection, transport and collector associated with engine, set all the pointers to NULL...
size_t size
Number of bytes in the buffer.
Definition: connection_engine.h:74
struct pn_event_t pn_event_t
An event provides notification of a state change within the protocol engine's object model...
Definition: event.h:77
A read-only memory buffer.
Definition: connection_engine.h:81
const char * data
Beginning of the buffered data.
Definition: connection_engine.h:82