Qpid Proton C API 0.39.0
 
Loading...
Searching...
No Matches
proactor.h File Reference

Unsettled API - An API for multithreaded IO. More...

#include <proton/condition.h>
#include <proton/event.h>
#include <proton/import_export.h>
#include <proton/types.h>

Go to the source code of this file.

Macros

#define PN_MAX_ADDR
 Size of buffer that can hold the largest connection or listening address.
 

Functions

PNP_EXTERN int pn_proactor_addr (char *addr, size_t size, const char *host, const char *port)
 Format a host:port address string for pn_proactor_connect() or pn_proactor_listen() More...
 
PNP_EXTERN pn_proactor_tpn_proactor (void)
 Create a proactor. More...
 
PNP_EXTERN void pn_proactor_free (pn_proactor_t *proactor)
 Free the proactor. More...
 
PNP_EXTERN void pn_proactor_connect2 (pn_proactor_t *proactor, pn_connection_t *connection, pn_transport_t *transport, const char *addr)
 Connect transport to addr and bind to connection. More...
 
PNP_EXTERN void pn_proactor_connect (pn_proactor_t *proactor, pn_connection_t *connection, const char *addr)
 Deprecated - Use pn_proactor_connect2()
 
PNP_EXTERN void pn_proactor_listen (pn_proactor_t *proactor, pn_listener_t *listener, const char *addr, int backlog)
 Start listening for incoming connections. More...
 
PNP_EXTERN void pn_proactor_disconnect (pn_proactor_t *proactor, pn_condition_t *condition)
 Disconnect all connections and listeners belonging to the proactor. More...
 
PNP_EXTERN pn_event_batch_tpn_proactor_wait (pn_proactor_t *proactor)
 Wait until there are Proactor events to handle. More...
 
PNP_EXTERN pn_event_batch_tpn_proactor_get (pn_proactor_t *proactor)
 Return Proactor events if any are available immediately. More...
 
PNP_EXTERN pn_event_tpn_event_batch_next (pn_event_batch_t *batch)
 Remove the next event from the batch and return it. More...
 
PNP_EXTERN pn_proactor_tpn_event_batch_proactor (pn_event_batch_t *batch)
 Query the batch for the subject of the batch. More...
 
PNP_EXTERN pn_listener_tpn_event_batch_listener (pn_event_batch_t *batch)
 Query the batch for the subject of the batch. More...
 
PNP_EXTERN pn_connection_tpn_event_batch_connection (pn_event_batch_t *batch)
 Query the batch for the subject of the batch. More...
 
PNP_EXTERN void pn_proactor_done (pn_proactor_t *proactor, pn_event_batch_t *events)
 Call when finished handling a batch of events. More...
 
PNP_EXTERN void pn_proactor_interrupt (pn_proactor_t *proactor)
 Return a PN_PROACTOR_INTERRUPT event as soon as possible. More...
 
PNP_EXTERN void pn_proactor_set_timeout (pn_proactor_t *proactor, pn_millis_t timeout)
 Return a PN_PROACTOR_TIMEOUT after timeout milliseconds elapse. More...
 
PNP_EXTERN void pn_proactor_cancel_timeout (pn_proactor_t *proactor)
 Cancel the pending timeout set by pn_proactor_set_timeout(). More...
 
PNP_EXTERN void pn_proactor_release_connection (pn_connection_t *connection)
 Release ownership of connection, disassociate it from its proactor. More...
 
PNP_EXTERN void pn_connection_wake (pn_connection_t *connection)
 Return a PN_CONNECTION_WAKE event for connection as soon as possible. More...
 
PNP_EXTERN void pn_connection_write_flush (pn_connection_t *connection)
 Unsettled API Send available AMQP protocol frames to the remote peer. More...
 
PNP_EXTERN pn_proactor_tpn_connection_proactor (pn_connection_t *connection)
 Return the proactor associated with a connection. More...
 
PNP_EXTERN pn_proactor_tpn_event_proactor (pn_event_t *event)
 Return the proactor associated with an event. More...
 
PNP_EXTERN pn_millis_t pn_proactor_now (void)
 
PNP_EXTERN int64_t pn_proactor_now_64 (void)
 Get the real elapsed time since an arbitrary point in the past in milliseconds. More...
 
PNP_EXTERN void pn_proactor_raw_connect (pn_proactor_t *proactor, pn_raw_connection_t *raw_connection, const char *addr)
 Connect addr and bind to raw_connection. More...
 

Detailed Description

Unsettled API - An API for multithreaded IO.