Client-side routines for communicating with the tesbted logger service. More...
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TESTBED_LOGGER_Handle |
Connection handle for the logger service. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "testbed-logger-api", __VA_ARGS__) |
Generic logging shorthand. More... | |
#define | BUFFER_SIZE |
The size of the buffer we fill before sending out the message. More... | |
Functions | |
static void | call_flush_completion (void *cls) |
Task to call the flush completion notification. More... | |
static void | trigger_flush_notification (struct GNUNET_TESTBED_LOGGER_Handle *h) |
Schedule the flush completion notification task. More... | |
static void | dispatch_buffer (struct GNUNET_TESTBED_LOGGER_Handle *h) |
Send the buffered data to the service. More... | |
static void | notify_sent (void *cls) |
MQ successfully sent a message. More... | |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
We got disconnected from the logger. More... | |
struct GNUNET_TESTBED_LOGGER_Handle * | GNUNET_TESTBED_LOGGER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) |
Connect to the testbed logger service. More... | |
void | GNUNET_TESTBED_LOGGER_disconnect (struct GNUNET_TESTBED_LOGGER_Handle *h) |
Disconnect from the logger service. More... | |
void | GNUNET_TESTBED_LOGGER_write (struct GNUNET_TESTBED_LOGGER_Handle *h, const void *data, size_t size) |
Send data to be logged to the logger service. More... | |
void | GNUNET_TESTBED_LOGGER_flush (struct GNUNET_TESTBED_LOGGER_Handle *h, GNUNET_TESTBED_LOGGER_FlushCompletion cb, void *cb_cls) |
Flush the buffered data to the logger service. More... | |
void | GNUNET_TESTBED_LOGGER_flush_cancel (struct GNUNET_TESTBED_LOGGER_Handle *h) |
Cancel notification upon flush. More... | |
Client-side routines for communicating with the tesbted logger service.
Definition in file testbed_logger_api.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "testbed-logger-api", __VA_ARGS__) |
Generic logging shorthand.
Definition at line 35 of file testbed_logger_api.c.
#define BUFFER_SIZE |
The size of the buffer we fill before sending out the message.
Definition at line 42 of file testbed_logger_api.c.
|
static |
Task to call the flush completion notification.
cls | the logger handle |
Definition at line 103 of file testbed_logger_api.c.
References bw, GNUNET_TESTBED_LOGGER_Handle::cb, GNUNET_TESTBED_LOGGER_Handle::cb_cls, and h.
Referenced by trigger_flush_notification().
|
static |
Schedule the flush completion notification task.
h | logger handle |
Definition at line 128 of file testbed_logger_api.c.
References call_flush_completion(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_cancel(), and h.
Referenced by GNUNET_TESTBED_LOGGER_flush(), and notify_sent().
|
static |
Send the buffered data to the service.
h | the logger handle |
Definition at line 175 of file testbed_logger_api.c.
References env, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_TESTBED_LOGGER_MSG, GNUNET_MQ_msg_extra, GNUNET_MQ_notify_sent(), GNUNET_MQ_send(), h, GNUNET_ARM_Handle::mq, msg, and notify_sent().
Referenced by GNUNET_TESTBED_LOGGER_flush(), GNUNET_TESTBED_LOGGER_write(), and notify_sent().
|
static |
MQ successfully sent a message.
cls | our handle |
Definition at line 153 of file testbed_logger_api.c.
References dispatch_buffer(), h, and trigger_flush_notification().
Referenced by dispatch_buffer().
|
static |
We got disconnected from the logger.
Stop logging.
cls | the struct GNUNET_TESTBED_LOGGER_Handle |
error | error code |
Definition at line 204 of file testbed_logger_api.c.
References GNUNET_break, GNUNET_MQ_destroy(), h, and GNUNET_ARM_Handle::mq.
Referenced by GNUNET_TESTBED_LOGGER_connect().