-starting with service_new implementation data structures
authorChristian Grothoff <christian@grothoff.org>
Mon, 29 Aug 2016 11:48:21 +0000 (11:48 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 29 Aug 2016 11:48:21 +0000 (11:48 +0000)
src/util/service_new.c

index 69d2471a97a5fa98e7310521b43e8356a6000005..953d3a8beffc125178d99bcdc62400e5cd193424 100644 (file)
@@ -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.