- "Client connecting, waiting to transmit\n");
- GNUNET_CLIENT_notify_transmit_ready (client,
- sizeof (struct GNUNET_MessageHeader),
- GNUNET_TIME_UNIT_SECONDS,
- GNUNET_NO, &build_msg, client);
-}
-
-static void
-recv_cb (void *cls,
- struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving client message...\n");
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
-}
-
-static struct GNUNET_SERVER_MessageHandler myhandlers[] = {
- {&recv_cb, NULL, MY_TYPE, sizeof (struct GNUNET_MessageHeader)},
- {NULL, NULL, 0, 0}
-};
-
-
-
-
-static void
-runner (void *cls,
- struct GNUNET_SCHEDULER_Handle *sched,
- struct GNUNET_SERVER_Handle *server,
- const struct GNUNET_CONFIGURATION_Handle *cfg)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service initializing\n");
- GNUNET_SERVER_add_handlers (server, myhandlers);
- GNUNET_CLIENT_service_test (sched,
- "test_service",
- cfg, GNUNET_TIME_UNIT_SECONDS, &ready,
- (void *) cfg);