From: Christian Grothoff Date: Mon, 29 Aug 2016 11:48:21 +0000 (+0000) Subject: -starting with service_new implementation data structures X-Git-Tag: initial-import-from-subversion-38251~315 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9996230c92c172894267bb0f230c2d61e6ce2beb;p=oweals%2Fgnunet.git -starting with service_new implementation data structures --- diff --git a/src/util/service_new.c b/src/util/service_new.c index 69d2471a9..953d3a8be 100644 --- a/src/util/service_new.c +++ b/src/util/service_new.c @@ -48,7 +48,27 @@ struct GNUNET_SERVICE_Handle /** * Main service-specific task to run. */ - GNUNET_SERVICE_Main task; + GNUNET_SERVICE_InitCallback service_init_cb; + + /** + * Function to call when clients connect. + */ + GNUNET_SERVICE_ConnectHandler connect_cb; + + /** + * Function to call when clients disconnect / are disconnected. + */ + GNUNET_SERVICE_DisconnectHandler disconnect_cb; + + /** + * Closure for @e service_init_cb, @e connect_cb, @e disconnect_cb. + */ + void *cb_cls; + + /** + * Message handlers to use for all clients. + */ + struct GNUNET_MQ_MessageHandler *handlers; /** * Closure for @e task.