convenience functions for transmission of messages to multiple clients More...
Go to the source code of this file.
Data Structures | |
struct | SubscriberList |
Lists of subscribers we manage for notifications. More... | |
struct | GNUNET_NotificationContext |
The notification context is the key datastructure for a convenience API used for transmission of notifications to the subscriber until the subscriber disconnects (or the notification context is destroyed, in which case we disconnect these subscribers). More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "util-nc", __VA_ARGS__) |
Functions | |
static void | handle_mq_destroy (void *cls) |
Subscriber has disconnected, clean up. More... | |
struct GNUNET_NotificationContext * | GNUNET_notification_context_create (unsigned int queue_length) |
Create a new notification context. More... | |
void | GNUNET_notification_context_destroy (struct GNUNET_NotificationContext *nc) |
Destroy the context, force disconnect for all subscribers. More... | |
void | GNUNET_notification_context_add (struct GNUNET_NotificationContext *nc, struct GNUNET_MQ_Handle *mq) |
Add a subscriber to the notification context. More... | |
void | GNUNET_notification_context_broadcast (struct GNUNET_NotificationContext *nc, const struct GNUNET_MessageHeader *msg, int can_drop) |
Send a message to all subscribers of this context. More... | |
unsigned int | GNUNET_notification_context_get_size (struct GNUNET_NotificationContext *nc) |
Return active number of subscribers in this context. More... | |
convenience functions for transmission of messages to multiple clients
Definition in file nc.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "util-nc", __VA_ARGS__) |
|
static |
Subscriber has disconnected, clean up.
cls | our struct SubscriberList * |
Definition at line 101 of file nc.c.
References GNUNET_CONTAINER_DLL_remove, GNUNET_free, SubscriberList::nc, nc, GNUNET_NotificationContext::subscribers_head, and GNUNET_NotificationContext::subscribers_tail.
Referenced by GNUNET_notification_context_add().