summaryrefslogtreecommitdiff
path: root/src/include/gnunet_client_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_client_lib.h')
-rw-r--r--src/include/gnunet_client_lib.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h
index 8e4984124..9fc52724c 100644
--- a/src/include/gnunet_client_lib.h
+++ b/src/include/gnunet_client_lib.h
@@ -47,6 +47,23 @@ extern "C"
47 47
48 48
49/** 49/**
50 * Test if the port or UNIXPATH of the given @a service_name
51 * is in use and thus (most likely) the respective service is up.
52 *
53 * @param cfg our configuration
54 * @param service_name name of the service to connect to
55 * @return #GNUNET_YES if the service is (likely) up (or running remotely),
56 * #GNUNET_NO if the service is (definitively) down,
57 * #GNUNET_SYSERR if the configuration does not give us
58 * the necessary information about the service, or if
59 * we could not check (i.e. socket() failed)
60 */
61int
62GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg,
63 const char *service_name);
64
65
66/**
50 * Create a message queue to connect to a GNUnet service. 67 * Create a message queue to connect to a GNUnet service.
51 * If handlers are specfied, receive messages from the connection. 68 * If handlers are specfied, receive messages from the connection.
52 * 69 *
@@ -57,11 +74,11 @@ extern "C"
57 * @return the message queue, NULL on error 74 * @return the message queue, NULL on error
58 */ 75 */
59struct GNUNET_MQ_Handle * 76struct GNUNET_MQ_Handle *
60GNUNET_CLIENT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, 77GNUNET_CLIENT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
61 const char *service_name, 78 const char *service_name,
62 const struct GNUNET_MQ_MessageHandler *handlers, 79 const struct GNUNET_MQ_MessageHandler *handlers,
63 GNUNET_MQ_ErrorHandler error_handler, 80 GNUNET_MQ_ErrorHandler error_handler,
64 void *error_handler_cls); 81 void *error_handler_cls);
65 82
66 83
67#if 0 /* keep Emacsens' auto-indent happy */ 84#if 0 /* keep Emacsens' auto-indent happy */