diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-16 05:33:01 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-16 05:33:01 +0100 |
commit | d23a815951413af100c74b38cdd09a01ca1c280a (patch) | |
tree | 5fd6a3eae1cd4497dc728917362067a8aded3151 /src/include/gnunet_service_lib.h | |
parent | a3acd27f0acf30a6c4803ec933c4fe7650bc296c (diff) | |
download | gnunet-d23a815951413af100c74b38cdd09a01ca1c280a.tar.gz gnunet-d23a815951413af100c74b38cdd09a01ca1c280a.zip |
removing dead/legacy server/connection logic, except for in tcp/wlan/bt plugins (which will be updated 'later')
Diffstat (limited to 'src/include/gnunet_service_lib.h')
-rw-r--r-- | src/include/gnunet_service_lib.h | 61 |
1 files changed, 17 insertions, 44 deletions
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h index 75b880530..c506fc6fa 100644 --- a/src/include/gnunet_service_lib.h +++ b/src/include/gnunet_service_lib.h | |||
@@ -44,22 +44,28 @@ extern "C" | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #include "gnunet_configuration_lib.h" | 46 | #include "gnunet_configuration_lib.h" |
47 | #include "gnunet_server_lib.h" | ||
48 | #include "gnunet_mq_lib.h" | 47 | #include "gnunet_mq_lib.h" |
49 | 48 | ||
49 | /** | ||
50 | * Largest supported message (to be precise, one byte more | ||
51 | * than the largest possible message, so tests involving | ||
52 | * this value should check for messages being smaller than | ||
53 | * this value). NOTE: legacy name. | ||
54 | */ | ||
55 | #define GNUNET_SERVER_MAX_MESSAGE_SIZE 65536 | ||
50 | 56 | ||
51 | /** | 57 | /** |
52 | * Function called by the service's run | 58 | * Smallest supported message. NOTE: legacy name. |
53 | * method to run service-specific setup code. | ||
54 | * | ||
55 | * @param cls closure | ||
56 | * @param server the initialized server | ||
57 | * @param cfg configuration to use | ||
58 | */ | 59 | */ |
59 | typedef void | 60 | #define GNUNET_SERVER_MIN_BUFFER_SIZE sizeof (struct GNUNET_MessageHeader) |
60 | (*GNUNET_SERVICE_Main) (void *cls, | 61 | |
61 | struct GNUNET_SERVER_Handle *server, | 62 | /** |
62 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 63 | * Timeout we use on TCP connect before trying another |
64 | * result from the DNS resolver. Actual value used | ||
65 | * is this value divided by the number of address families. | ||
66 | * Default is 5s. NOTE: legacy name. | ||
67 | */ | ||
68 | #define GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | ||
63 | 69 | ||
64 | 70 | ||
65 | /** | 71 | /** |
@@ -88,27 +94,6 @@ enum GNUNET_SERVICE_Options | |||
88 | }; | 94 | }; |
89 | 95 | ||
90 | 96 | ||
91 | /** | ||
92 | * Run a standard GNUnet service startup sequence (initialize loggers | ||
93 | * and configuration, parse options). | ||
94 | * | ||
95 | * @param argc number of command line arguments in @a argv | ||
96 | * @param argv command line arguments | ||
97 | * @param service_name our service name | ||
98 | * @param options service options | ||
99 | * @param task main task of the service | ||
100 | * @param task_cls closure for @a task | ||
101 | * @return #GNUNET_SYSERR on error, #GNUNET_OK | ||
102 | * if we shutdown nicely | ||
103 | * @deprecated | ||
104 | */ | ||
105 | int | ||
106 | GNUNET_SERVICE_run (int argc, | ||
107 | char *const *argv, | ||
108 | const char *service_name, | ||
109 | enum GNUNET_SERVICE_Options options, | ||
110 | GNUNET_SERVICE_Main task, | ||
111 | void *task_cls); | ||
112 | 97 | ||
113 | 98 | ||
114 | /** | 99 | /** |
@@ -134,18 +119,6 @@ GNUNET_SERVICE_start (const char *service_name, | |||
134 | 119 | ||
135 | 120 | ||
136 | /** | 121 | /** |
137 | * Obtain the server used by a service. Note that the server must NOT | ||
138 | * be destroyed by the caller. | ||
139 | * | ||
140 | * @param ctx the service context returned from the start function | ||
141 | * @return handle to the server for this service, NULL if there is none | ||
142 | * @deprecated | ||
143 | */ | ||
144 | struct GNUNET_SERVER_Handle * | ||
145 | GNUNET_SERVICE_get_server (struct GNUNET_SERVICE_Context *ctx); | ||
146 | |||
147 | |||
148 | /** | ||
149 | * Get the NULL-terminated array of listen sockets for this service. | 122 | * Get the NULL-terminated array of listen sockets for this service. |
150 | * | 123 | * |
151 | * @param ctx service context to query | 124 | * @param ctx service context to query |