Handle to a message queue. More...
Data Fields | |
struct GNUNET_MQ_MessageHandler * | handlers |
Handlers array, or NULL if the queue should not receive messages. More... | |
GNUNET_MQ_SendImpl | send_impl |
Actual implementation of message sending, called when a message is added. More... | |
GNUNET_MQ_DestroyImpl | destroy_impl |
Implementation-dependent queue destruction function. More... | |
GNUNET_MQ_CancelImpl | cancel_impl |
Implementation-dependent send cancel function. More... | |
void * | impl_state |
Implementation-specific state. More... | |
GNUNET_MQ_ErrorHandler | error_handler |
Callback will be called when an error occurs. More... | |
void * | error_handler_cls |
Closure for the error handler. More... | |
struct GNUNET_SCHEDULER_Task * | send_task |
Task to asynchronously run impl_send_continue(). More... | |
struct GNUNET_MQ_Envelope * | envelope_head |
Linked list of messages pending to be sent. More... | |
struct GNUNET_MQ_Envelope * | envelope_tail |
Linked list of messages pending to be sent. More... | |
struct GNUNET_MQ_Envelope * | current_envelope |
Message that is currently scheduled to be sent. More... | |
struct GNUNET_CONTAINER_MultiHashMap32 * | assoc_map |
Map of associations, lazily allocated. More... | |
struct GNUNET_MQ_DestroyNotificationHandle * | dnh_head |
Functions to call on queue destruction; kept in a DLL. More... | |
struct GNUNET_MQ_DestroyNotificationHandle * | dnh_tail |
Functions to call on queue destruction; kept in a DLL. More... | |
enum GNUNET_MQ_PriorityPreferences | priority |
Flags that were set for this queue by GNUNET_MQ_set_options(). More... | |
uint32_t | assoc_id |
Next id that should be used for the assoc_map, initialized lazily to a random value together with assoc_map. More... | |
unsigned int | queue_length |
Number of entries we have in the envelope-DLL. More... | |
bool | in_flight |
True if GNUNET_MQ_impl_send_in_flight() was called. More... | |
struct GNUNET_MQ_MessageHandler* GNUNET_MQ_Handle::handlers |
Handlers array, or NULL if the queue should not receive messages.
Definition at line 91 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_inject_message(), GNUNET_MQ_queue_for_callbacks(), and GNUNET_MQ_set_handlers_closure().
GNUNET_MQ_SendImpl GNUNET_MQ_Handle::send_impl |
Actual implementation of message sending, called when a message is added.
Definition at line 97 of file mq.c.
Referenced by GNUNET_MQ_queue_for_callbacks(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), and impl_send_continue().
GNUNET_MQ_DestroyImpl GNUNET_MQ_Handle::destroy_impl |
Implementation-dependent queue destruction function.
Definition at line 102 of file mq.c.
Referenced by GNUNET_MQ_destroy(), and GNUNET_MQ_queue_for_callbacks().
GNUNET_MQ_CancelImpl GNUNET_MQ_Handle::cancel_impl |
Implementation-dependent send cancel function.
Definition at line 107 of file mq.c.
Referenced by GNUNET_MQ_queue_for_callbacks(), and GNUNET_MQ_send_cancel().
void* GNUNET_MQ_Handle::impl_state |
Implementation-specific state.
Definition at line 112 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_impl_state(), GNUNET_MQ_queue_for_callbacks(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), and impl_send_continue().
GNUNET_MQ_ErrorHandler GNUNET_MQ_Handle::error_handler |
Callback will be called when an error occurs.
Definition at line 117 of file mq.c.
Referenced by GNUNET_MQ_inject_error(), and GNUNET_MQ_queue_for_callbacks().
void* GNUNET_MQ_Handle::error_handler_cls |
Closure for the error handler.
Definition at line 122 of file mq.c.
Referenced by GNUNET_MQ_inject_error(), and GNUNET_MQ_queue_for_callbacks().
struct GNUNET_SCHEDULER_Task* GNUNET_MQ_Handle::send_task |
Task to asynchronously run impl_send_continue().
Definition at line 127 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_impl_send_continue(), GNUNET_MQ_send(), and impl_send_continue().
struct GNUNET_MQ_Envelope* GNUNET_MQ_Handle::envelope_head |
Linked list of messages pending to be sent.
Definition at line 132 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), GNUNET_MQ_unsent_head(), and impl_send_continue().
struct GNUNET_MQ_Envelope* GNUNET_MQ_Handle::envelope_tail |
Linked list of messages pending to be sent.
Definition at line 137 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_get_last_envelope(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), GNUNET_MQ_unsent_head(), and impl_send_continue().
struct GNUNET_MQ_Envelope* GNUNET_MQ_Handle::current_envelope |
Message that is currently scheduled to be sent.
Not the head of the message queue, as the implementation needs to know if sending has been already scheduled or not.
Definition at line 144 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_get_current_envelope(), GNUNET_MQ_get_last_envelope(), GNUNET_MQ_impl_current(), GNUNET_MQ_impl_send_continue(), GNUNET_MQ_impl_send_in_flight(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), and impl_send_continue().
struct GNUNET_CONTAINER_MultiHashMap32* GNUNET_MQ_Handle::assoc_map |
Map of associations, lazily allocated.
Definition at line 149 of file mq.c.
Referenced by GNUNET_MQ_assoc_add(), GNUNET_MQ_assoc_get(), GNUNET_MQ_assoc_remove(), and GNUNET_MQ_destroy().
struct GNUNET_MQ_DestroyNotificationHandle* GNUNET_MQ_Handle::dnh_head |
Functions to call on queue destruction; kept in a DLL.
Definition at line 154 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_destroy_notify(), and GNUNET_MQ_destroy_notify_cancel().
struct GNUNET_MQ_DestroyNotificationHandle* GNUNET_MQ_Handle::dnh_tail |
Functions to call on queue destruction; kept in a DLL.
Definition at line 159 of file mq.c.
Referenced by GNUNET_MQ_destroy_notify(), and GNUNET_MQ_destroy_notify_cancel().
enum GNUNET_MQ_PriorityPreferences GNUNET_MQ_Handle::priority |
Flags that were set for this queue by GNUNET_MQ_set_options().
Default is 0.
Definition at line 165 of file mq.c.
Referenced by GNUNET_MQ_env_get_options(), and GNUNET_MQ_set_options().
uint32_t GNUNET_MQ_Handle::assoc_id |
Next id that should be used for the assoc_map, initialized lazily to a random value together with assoc_map.
Definition at line 172 of file mq.c.
Referenced by GNUNET_MQ_assoc_add().
unsigned int GNUNET_MQ_Handle::queue_length |
Number of entries we have in the envelope-DLL.
Definition at line 177 of file mq.c.
Referenced by GNUNET_MQ_destroy(), GNUNET_MQ_get_length(), GNUNET_MQ_impl_send_continue(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), and GNUNET_MQ_unsent_head().
bool GNUNET_MQ_Handle::in_flight |
True if GNUNET_MQ_impl_send_in_flight() was called.
Definition at line 182 of file mq.c.
Referenced by GNUNET_MQ_get_length(), GNUNET_MQ_impl_send_continue(), GNUNET_MQ_impl_send_in_flight(), and GNUNET_MQ_send_cancel().