#include "platform.h"
#include <stdlib.h>
#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
Go to the source code of this file.
Functions | |
static void | handle_stop (void *cls, const struct GNUNET_MessageHeader *message) |
Handler for STOP message. More... | |
static void * | client_connect_cb (void *cls, struct GNUNET_SERVICE_Client *c, struct GNUNET_MQ_Handle *mq) |
Callback called when a client connects to the service. More... | |
static void | client_disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *c, void *internal_cls) |
Callback called when a client disconnected from the service. More... | |
static void | run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_SERVICE_Handle *service) |
GNUNET_SERVICE_MAIN ("do-nothing", GNUNET_SERVICE_OPTION_NONE, &run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_fixed_size(stop, GNUNET_MESSAGE_TYPE_ARM_STOP, struct GNUNET_MessageHeader, NULL), GNUNET_MQ_handler_end()) | |
Define "main" method using service macro. More... | |
void | __attribute__ ((destructor)) |
MINIMIZE heap size (way below 128k) since this process doesn't need much. More... | |
Variables | |
static int | special_ret = 0 |
|
static |
Handler for STOP message.
cls | client identification of the client |
message | the actual message |
Definition at line 36 of file mockup-service.c.
References _, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_SCHEDULER_shutdown(), GNUNET_SERVICE_client_persist(), and special_ret.
|
static |
Callback called when a client connects to the service.
cls | closure for the service |
c | the new client that connected to the service |
mq | the message queue used to send messages to the client |
Definition at line 61 of file mockup-service.c.
References mq.
|
static |
Callback called when a client disconnected from the service.
cls | closure for the service |
c | the client that disconnected |
internal_cls | should be equal to c |
Definition at line 79 of file mockup-service.c.
References GNUNET_assert.
|
static |
Definition at line 89 of file mockup-service.c.
GNUNET_SERVICE_MAIN | ( | "do-nothing" | , |
GNUNET_SERVICE_OPTION_NONE | , | ||
& | run, | ||
& | client_connect_cb, | ||
& | client_disconnect_cb, | ||
NULL | , | ||
GNUNET_MQ_hd_fixed_size(stop, GNUNET_MESSAGE_TYPE_ARM_STOP, struct GNUNET_MessageHeader, NULL) | , | ||
GNUNET_MQ_handler_end() | |||
) |
Define "main" method using service macro.
void __attribute__ | ( | (destructor) | ) |
MINIMIZE heap size (way below 128k) since this process doesn't need much.
Definition at line 119 of file mockup-service.c.
References special_ret.
|
static |
Definition at line 27 of file mockup-service.c.
Referenced by __attribute__(), and handle_stop().