From cea4dee2c9d257d65a2a5f07ea6e85d43634aa68 Mon Sep 17 00:00:00 2001 From: Timo Dritschler Date: Wed, 26 Nov 2014 18:03:31 +0100 Subject: Added a Main Loop model to kiro-client Added kiro_client_disconnect function Added missing memory cleanup to kiro server and client upon shutdown --- src/kiro-client.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/kiro-client.h') diff --git a/src/kiro-client.h b/src/kiro-client.h index 9e9d3ef..9c6036d 100644 --- a/src/kiro-client.h +++ b/src/kiro-client.h @@ -124,6 +124,23 @@ void kiro_client_free (KiroClient *client); */ int kiro_client_connect (KiroClient *client, const char *dest_addr, const char *dest_port); +/** + * kiro_client_disconnect - Diconnect a #KiroClient from the Server + * @client: (transfer none): The #KiroClient to disconnect + * Description: + * Disconnects the given #KiroClient from the KIRO server that it is connected + * to. If the @client is not connected, this function has no effect. + * Note: + * The memory content that has been transfered from the server is + * automatically freed when calling this function. If you want to continue + * using the memory after disconnecting the @client, make sure to memcpy() it + * first, using the informations obtained from kiro_client_get_memory() and + * kiro_client_get_memory_size(). + * See also: + * kiro_server_connect + */ +void kiro_client_disconnect (KiroClient *client); + /** * kiro_client_sync - Read data from the connected server * @client: (transfer none): The #KiroServer to use sync on -- cgit v1.2.3