summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume@friloux.me>2016-12-12 16:51:18 +0100
committerGuillaume Friloux <guillaume@friloux.me>2016-12-12 16:51:50 +0100
commitabbfd6e6a357450d1da7ef0171b3364828d705e7 (patch)
tree7c71405583de50061a6e6779dbf5deeb8e07d0af
parentd0c9525d83a60739305c81d6ef39496b10f15a28 (diff)
Add azy_server_module_close().
-rw-r--r--src/include/azy/Azy.h1
-rw-r--r--src/lib/azy/azy_server_module.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/include/azy/Azy.h b/src/include/azy/Azy.h
index 0a47c48..ba8e295 100644
--- a/src/include/azy/Azy.h
+++ b/src/include/azy/Azy.h
@@ -424,6 +424,7 @@ EAPI Eina_Bool azy_server_module_size_set(Azy_Server_Module_Def
424EAPI double azy_server_module_version_get(Azy_Server_Module *m); 424EAPI double azy_server_module_version_get(Azy_Server_Module *m);
425EAPI void azy_server_module_def_version_set(Azy_Server_Module_Def *def, double version); 425EAPI void azy_server_module_def_version_set(Azy_Server_Module_Def *def, double version);
426EAPI Eina_Bool azy_server_module_upgrade(Azy_Server_Module *module); 426EAPI Eina_Bool azy_server_module_upgrade(Azy_Server_Module *module);
427EAPI void azy_server_module_close(Azy_Server_Module *module);
427 428
428/* net */ 429/* net */
429EAPI Azy_Net *azy_net_new(void *conn); 430EAPI Azy_Net *azy_net_new(void *conn);
diff --git a/src/lib/azy/azy_server_module.c b/src/lib/azy/azy_server_module.c
index 8442523..e3c6aa3 100644
--- a/src/lib/azy/azy_server_module.c
+++ b/src/lib/azy/azy_server_module.c
@@ -818,4 +818,18 @@ err:
818 return NULL; 818 return NULL;
819} 819}
820 820
821/**
822 * @brief Disconnect a client
823 *
824 * This function is used to terminate connection with the client.
825 * @param module The client's #Azy_Server_Module object (NOT NULL)
826 */
827void
828azy_server_module_close(Azy_Server_Module *module)
829{
830 EINA_SAFETY_ON_NULL_RETURN(module->client->net);
831 EINA_SAFETY_ON_NULL_RETURN(module->client->net->conn);
832
833 ecore_con_client_del(module->client->net->conn);
834}
821/** @} */ 835/** @} */