43 "Initiating shutdown as requested by client.\n");
struct GNUNET_MQ_Handle * mq
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
Constants for network protocols.
#define GNUNET_log(kind,...)
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
#define GNUNET_MESSAGE_TYPE_ARM_STOP
Request to ARM to stop a service.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
void GNUNET_SERVICE_client_persist(struct GNUNET_SERVICE_Client *c)
Set the persist option on this client.
@ GNUNET_SERVICE_OPTION_NONE
Use defaults.
static void handle_stop(void *cls, const struct GNUNET_MessageHeader *message)
Handler for STOP message.
void GNUNET_mockup_done(void)
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.
static void client_disconnect_cb(void *cls, struct GNUNET_SERVICE_Client *c, void *internal_cls)
Callback called when a client disconnected from the service.
void __attribute__((destructor))
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.
static void run(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_SERVICE_Handle *service)
Handle to a message queue.
Handle to a client that is connected to a service.