aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_service_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-08-29 11:32:27 +0000
committerChristian Grothoff <christian@grothoff.org>2016-08-29 11:32:27 +0000
commit3c4f3cedb15862bb6911166df9348bbbca9886d4 (patch)
tree8fe2b5cba1398c16f660bc0216ea290222579bc8 /src/include/gnunet_service_lib.h
parentac40d74f85dd2a0cbacf520d4456c6746c64e12e (diff)
downloadgnunet-3c4f3cedb15862bb6911166df9348bbbca9886d4.tar.gz
gnunet-3c4f3cedb15862bb6911166df9348bbbca9886d4.zip
-document new API
Diffstat (limited to 'src/include/gnunet_service_lib.h')
-rw-r--r--src/include/gnunet_service_lib.h42
1 files changed, 23 insertions, 19 deletions
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h
index f7d2f781c..389de0575 100644
--- a/src/include/gnunet_service_lib.h
+++ b/src/include/gnunet_service_lib.h
@@ -274,15 +274,17 @@ typedef void
274 * dropped. Additionally, clients can be dropped at any time using 274 * dropped. Additionally, clients can be dropped at any time using
275 * #GNUNET_SERVICE_client_drop(). 275 * #GNUNET_SERVICE_client_drop().
276 * 276 *
277 * @param argc 277 * @param argc number of command-line arguments in @a argv
278 * @param argv 278 * @param argv array of command-line arguments
279 * @param service_name 279 * @param service_name name of the service to run
280 * @param options 280 * @param options options controlling shutdown of the service
281 * @param service_init_cb 281 * @param service_init_cb function to call once the service is ready
282 * @param connect_cb 282 * @param connect_cb function to call whenever a client connects
283 * @param disconnect_cb 283 * @param disconnect_cb function to call whenever a client disconnects
284 * @param cls 284 * @param cls closure argument for @a service_init_cb, @a connect_cb and @a disconnect_cb
285 * @param handlers 285 * @param handlers NULL-terminated array of message handlers for the service,
286 * the closure will be set to the value returned by
287 * the @a connect_cb for the respective connection
286 * @return 0 on success, non-zero on error 288 * @return 0 on success, non-zero on error
287 */ 289 */
288int 290int
@@ -326,15 +328,15 @@ GNUNET_SERVICE_ruN_ (int argc,
326 * dropped. Additionally, clients can be dropped at any time using 328 * dropped. Additionally, clients can be dropped at any time using
327 * #GNUNET_SERVICE_client_drop(). 329 * #GNUNET_SERVICE_client_drop().
328 * 330 *
329 * @param argc 331 * @param service_name name of the service to run
330 * @param argv 332 * @param options options controlling shutdown of the service
331 * @param service_name 333 * @param service_init_cb function to call once the service is ready
332 * @param options 334 * @param connect_cb function to call whenever a client connects
333 * @param service_init_cb 335 * @param disconnect_cb function to call whenever a client disconnects
334 * @param connect_cb 336 * @param cls closure argument for @a service_init_cb, @a connect_cb and @a disconnect_cb
335 * @param disconnect_cb 337 * @param handlers NULL-terminated array of message handlers for the service,
336 * @param cls 338 * the closure will be set to the value returned by
337 * @param handlers 339 * the @a connect_cb for the respective connection
338 * @return 0 on success, non-zero on error 340 * @return 0 on success, non-zero on error
339 */ 341 */
340#define GNUNET_SERVICE_MAIN(service_name,service_options,init_cb,connect_cb,disconnect_cb,cls,handlers) \ 342#define GNUNET_SERVICE_MAIN(service_name,service_options,init_cb,connect_cb,disconnect_cb,cls,handlers) \
@@ -399,7 +401,9 @@ GNUNET_SERVICE_client_disable_continue_warning (struct GNUNET_SERVICE_Client *c)
399 * Ask the server to disconnect from the given client. This is the 401 * Ask the server to disconnect from the given client. This is the
400 * same as returning #GNUNET_SYSERR within the check procedure when 402 * same as returning #GNUNET_SYSERR within the check procedure when
401 * handling a message, wexcept that it allows dropping of a client even 403 * handling a message, wexcept that it allows dropping of a client even
402 * when not handling a message from that client. 404 * when not handling a message from that client. The `disconnect_cb`
405 * will be called on @a c even if the application closes the connection
406 * using this function.
403 * 407 *
404 * @param c client to disconnect now 408 * @param c client to disconnect now
405 */ 409 */