Qpid Proton C API
0.17.0
|
Experimental - Multithreaded IO More...
Go to the source code of this file.
Typedefs | |
typedef struct pn_proactor_t | pn_proactor_t |
The proactor, see pn_proactor() | |
Functions | |
pn_proactor_t * | pn_proactor (void) |
Create a proactor. More... | |
void | pn_proactor_free (pn_proactor_t *proactor) |
Free the proactor. More... | |
int | pn_proactor_connect (pn_proactor_t *proactor, pn_connection_t *connection, const char *host, const char *port) |
Connect connection to host/port. More... | |
int | pn_proactor_listen (pn_proactor_t *proactor, pn_listener_t *listener, const char *host, const char *port, int backlog) |
Start listening with listener. More... | |
pn_event_batch_t * | pn_proactor_wait (pn_proactor_t *proactor) |
Wait for events to handle. More... | |
void | pn_proactor_done (pn_proactor_t *proactor, pn_event_batch_t *events) |
Call when done handling a batch of events. More... | |
void | pn_proactor_interrupt (pn_proactor_t *proactor) |
Cause PN_PROACTOR_INTERRUPT to be returned to exactly one call of pn_proactor_wait(). More... | |
void | pn_proactor_set_timeout (pn_proactor_t *proactor, pn_millis_t timeout) |
Cause PN_PROACTOR_TIMEOUT to be returned to a thread calling wait() after timeout milliseconds. More... | |
void | pn_connection_wake (pn_connection_t *connection) |
Cause a PN_CONNECTION_WAKE event to be returned by the proactor, even if there are no IO events pending for the connection. More... | |
pn_proactor_t * | pn_connection_proactor (pn_connection_t *connection) |
Return the proactor associated with a connection or NULL. | |
pn_proactor_t * | pn_event_proactor (pn_event_t *event) |
Return the proactor associated with an event or NULL. | |
pn_listener_t * | pn_event_listener (pn_event_t *event) |
Return the listener associated with an event or NULL. | |
Experimental - Multithreaded IO
The proactor associates a Connection with a Transport, either by making an outgoing connection or accepting an incoming one. It delivers events to application threads for handling.
The Proactor is thread-safe, but the protocol engine is not. The proactor ensures that each Connection and its associated values (Session, Link etc.) is handle sequentially, even if there are multiple application threads. See pn_proactor_wait().