1 #ifndef PROTON_TRANSPORT_H
2 #define PROTON_TRANSPORT_H 1
29 #include <sys/types.h>
68 #define PN_TRACE_OFF (0)
73 #define PN_TRACE_RAW (1)
78 #define PN_TRACE_FRM (2)
83 #define PN_TRACE_DRV (4)
uint32_t pn_millis_t
Definition: types.h:47
PN_EXTERN int pn_transport_process(pn_transport_t *transport, size_t size)
Process input data following the tail pointer.
The Condition API for the proton Engine.
struct pn_error_t pn_error_t
Definition: error.h:32
PN_EXTERN void pn_transport_set_max_frame(pn_transport_t *transport, uint32_t size)
Set the maximum frame size of a transport.
PN_EXTERN void pn_transport_set_idle_timeout(pn_transport_t *transport, pn_millis_t timeout)
Set the idle timeout for a transport.
PN_EXTERN ssize_t pn_transport_output(pn_transport_t *transport, char *bytes, size_t size)
PN_EXTERN int pn_transport_close_head(pn_transport_t *transport)
Indicate that the output has closed.
struct pn_record_t pn_record_t
Definition: object.h:46
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:112
PN_EXTERN void pn_transport_set_context(pn_transport_t *transport, void *context)
PN_EXTERN int pn_transport_close_tail(pn_transport_t *transport)
Indicate that the input has reached End Of Stream (EOS).
PN_EXTERN pn_millis_t pn_transport_get_remote_idle_timeout(pn_transport_t *transport)
Get the idle timeout for a transport's remote peer.
PN_EXTERN char * pn_transport_tail(pn_transport_t *transport)
Get the transport's tail pointer.
PN_EXTERN void pn_transport_trace(pn_transport_t *transport, pn_trace_t trace)
Update a transports trace flags.
int64_t pn_timestamp_t
Definition: types.h:50
PN_EXTERN bool pn_transport_quiesced(pn_transport_t *transport)
Check if a transport has buffered data.
PN_EXTERN bool pn_transport_closed(pn_transport_t *transport)
Check if a transport is closed.
PN_EXTERN void pn_transport_logf(pn_transport_t *transport, const char *fmt,...)
Log a printf formatted message using a transport's logging mechanism.
PN_EXTERN ssize_t pn_transport_push(pn_transport_t *transport, const char *src, size_t size)
Pushes the supplied bytes into the tail of the transport.
PN_EXTERN int pn_transport_bind(pn_transport_t *transport, pn_connection_t *connection)
Binds the transport to an AMQP connection.
PN_EXTERN void pn_transport_vlogf(pn_transport_t *transport, const char *fmt, va_list ap)
Log a printf formatted message using a transport's logging mechanism.
PN_EXTERN uint32_t pn_transport_get_max_frame(pn_transport_t *transport)
Get the maximum frame size of a transport.
PN_EXTERN int pn_transport_unbind(pn_transport_t *transport)
Unbinds a transport from its AMQP connection.
PN_EXTERN const char * pn_transport_head(pn_transport_t *transport)
Get the transport's head pointer.
PN_EXTERN pn_timestamp_t pn_transport_tick(pn_transport_t *transport, pn_timestamp_t now)
Process any pending transport timer events.
PN_EXTERN void pn_transport_set_channel_max(pn_transport_t *transport, uint16_t channel_max)
Set the maximum allowed channel for a transport.
#define PN_EXTERN
Definition: import_export.h:53
PN_EXTERN void pn_transport_set_tracer(pn_transport_t *transport, pn_tracer_t tracer)
Set the tracing function used by a transport.
PN_EXTERN pn_condition_t * pn_transport_condition(pn_transport_t *transport)
Get additional information about the condition of the transport.
PN_EXTERN ssize_t pn_transport_pending(pn_transport_t *transport)
Get the number of pending output bytes following the transport's head pointer.
PN_EXTERN uint64_t pn_transport_get_frames_output(const pn_transport_t *transport)
Get the number of frames output by a transport.
PN_EXTERN ssize_t pn_transport_capacity(pn_transport_t *transport)
Get the amount of free space for input following the transport's tail pointer.
PN_EXTERN pn_tracer_t pn_transport_get_tracer(pn_transport_t *transport)
Get the tracning function used by a transport.
PN_EXTERN void pn_transport_free(pn_transport_t *transport)
Free a transport object.
PN_EXTERN uint16_t pn_transport_get_channel_max(pn_transport_t *transport)
Get the maximum allowed channel for a transport.
PN_EXTERN pn_record_t * pn_transport_attachments(pn_transport_t *transport)
Get the attachments that are associated with a transport object.
PN_EXTERN void pn_transport_set_server(pn_transport_t *transport)
Configure a transport as a server.
void(* pn_tracer_t)(pn_transport_t *transport, const char *message)
Callback for customizing logging behaviour.
Definition: transport.h:63
PN_EXTERN pn_connection_t * pn_transport_connection(pn_transport_t *transport)
Access the AMQP Connection associated with the transport.
PN_EXTERN void pn_transport_log(pn_transport_t *transport, const char *message)
Log a message using a transport's logging mechanism.
PN_EXTERN ssize_t pn_transport_input(pn_transport_t *transport, const char *bytes, size_t available)
PN_EXTERN pn_millis_t pn_transport_get_idle_timeout(pn_transport_t *transport)
Get the idle timeout for a transport.
int pn_trace_t
Holds the trace flags for an AMQP transport.
Definition: transport.h:58
PN_EXTERN pn_transport_t * pn_transport(void)
Factory for creating a transport.
PN_EXTERN uint32_t pn_transport_get_remote_max_frame(pn_transport_t *transport)
Get the maximum frame size of a transport's remote peer.
struct pn_transport_t pn_transport_t
An AMQP Transport object.
Definition: types.h:256
PN_EXTERN void pn_transport_pop(pn_transport_t *transport, size_t size)
Removes size bytes of output from the pending output queue following the transport's head pointer...
PN_EXTERN pn_error_t * pn_transport_error(pn_transport_t *transport)
PN_EXTERN uint64_t pn_transport_get_frames_input(const pn_transport_t *transport)
Get the number of frames input by a transport.
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:65
PN_EXTERN uint16_t pn_transport_remote_channel_max(pn_transport_t *transport)
Get the maximum allowed channel of a transport's remote peer.
PN_EXTERN ssize_t pn_transport_peek(pn_transport_t *transport, char *dst, size_t size)
Copies size bytes from the head of the transport to the dst pointer.
PN_EXTERN void * pn_transport_get_context(pn_transport_t *transport)
Get the application context that is associated with a transport object.