From: Christian Grothoff Date: Mon, 29 Aug 2016 11:53:43 +0000 (+0000) Subject: -starting with service_new implementation data structures X-Git-Tag: initial-import-from-subversion-38251~314 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6fcc801b71ec034cc6abb1d19323cd0355d657cd;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 953d3a8be..68988069f 100644 --- a/src/util/service_new.c +++ b/src/util/service_new.c @@ -30,6 +30,40 @@ #include "gnunet_resolver_service.h" +/** + * Information the service tracks per listen operation. + */ +struct ServiceListenContext +{ + + /** + * Kept in a DLL. + */ + struct ServiceListenContext *next; + + /** + * Kept in a DLL. + */ + struct ServiceListenContext *prev; + + /** + * Service this listen context belongs to. + */ + struct GNUNET_SERVICE_Handle *sh; + + /** + * Socket we are listening on. + */ + struct GNUNET_NETWORK_Handle *listen_socket; + + /** + * Task scheduled to do the listening. + */ + struct GNUNET_SCHEDULER_Task *listen_task; + +}; + + /** * Handle to a service. */ @@ -65,6 +99,16 @@ struct GNUNET_SERVICE_Handle */ void *cb_cls; + /** + * DLL of listen sockets used to accept new connections. + */ + struct ServiceListenContext *slc_head; + + /** + * DLL of listen sockets used to accept new connections. + */ + struct ServiceListenContext *slc_tail; + /** * Message handlers to use for all clients. */