Generic client-side communication with services. More...
Functions | |
enum GNUNET_GenericReturnValue | GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name) |
Test if the port or UNIXPATH of the given service_name is in use and thus (most likely) the respective service is up. More... | |
struct GNUNET_MQ_Handle * | GNUNET_CLIENT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name, const struct GNUNET_MQ_MessageHandler *handlers, GNUNET_MQ_ErrorHandler error_handler, void *error_handler_cls) |
Create a message queue to connect to a GNUnet service. More... | |
Generic client-side communication with services.
enum GNUNET_GenericReturnValue GNUNET_CLIENT_test | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg, |
const char * | service_name | ||
) |
Test if the port or UNIXPATH of the given service_name is in use and thus (most likely) the respective service is up.
cfg | our configuration |
service_name | name of the service to connect to |
cfg | our configuration |
service_name | name of the service to connect to |
Definition at line 903 of file client.c.
References _, cfg, GNUNET_assert, GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONFIGURATION_have_value(), GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log_config_invalid(), GNUNET_log_config_missing(), GNUNET_log_strerror, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_YES, ClientState::hostname, port, ret, and service_name.
Referenced by action_loop(), and run().
struct GNUNET_MQ_Handle * GNUNET_CLIENT_connect | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg, |
const char * | service_name, | ||
const struct GNUNET_MQ_MessageHandler * | handlers, | ||
GNUNET_MQ_ErrorHandler | error_handler, | ||
void * | error_handler_cls | ||
) |
Create a message queue to connect to a GNUnet service.
If handlers are specified, receive messages from the connection.
cfg | our configuration |
service_name | name of the service to connect to |
handlers | handlers for receiving messages, can be NULL |
error_handler | error handler |
error_handler_cls | closure for the error_handler |
Definition at line 1060 of file client.c.
References _, cfg, ClientState::cfg, connection_client_cancel_impl(), connection_client_destroy_impl(), connection_client_send_impl(), error_handler(), GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONFIGURATION_have_value(), GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_MQ_queue_for_callbacks(), GNUNET_MST_create(), GNUNET_new, GNUNET_OK, GNUNET_SCHEDULER_add_now(), GNUNET_strdup, GNUNET_SYSERR, GNUNET_YES, handlers, ClientState::hostname, LOG, ClientState::mq, ClientState::mst, ClientState::port, recv_message(), ClientState::retry_task, service_name, ClientState::service_name, start_connect(), and test_service_configuration().
Referenced by addr_cb(), announce_reconnect(), connect_task(), create_internal(), create_loc_uri(), do_connect(), do_reconnect(), GNUNET_CONSENSUS_create(), GNUNET_CONVERSATION_call_start(), GNUNET_DATASTORE_disconnect(), GNUNET_FS_get_indexed_files(), GNUNET_IDENTITY_ego_lookup(), GNUNET_IDENTITY_ego_lookup_by_suffix(), GNUNET_NAT_AUTO_autoconfig_start(), GNUNET_REVOCATION_query(), GNUNET_REVOCATION_revoke(), GNUNET_SCALARPRODUCT_accept_computation(), GNUNET_SCALARPRODUCT_start_computation(), GNUNET_SECRETSHARING_create_session(), GNUNET_SECRETSHARING_decrypt(), GNUNET_SETI_create(), GNUNET_SETU_create(), hash_for_index_cb(), listen_connect(), reconnect(), reconnect_arm(), reconnect_arm_monitor(), reconnect_phone(), reconnect_task(), search_reconnect(), test_nat_punched(), try_connect(), try_reconnect(), and unindex_finish().