summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp/nanohttp-client.c')
-rw-r--r--nanohttp/nanohttp-client.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c
index b1d101f..fc1d8f5 100644
--- a/nanohttp/nanohttp-client.c
+++ b/nanohttp/nanohttp-client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-client.c,v 1.27 2005/05/27 19:28:15 snowdrop Exp $
+* $Id: nanohttp-client.c,v 1.28 2005/07/27 07:45:56 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -92,6 +92,19 @@ httpc_new()
return res;
}
+/*--------------------------------------------------
+FUNCTION: httpc_close_free
+DESC: Close and free the given http client object.
+----------------------------------------------------*/
+void
+httpc_close_free(httpc_conn_t * conn)
+{
+ if (conn == NULL)
+ return;
+
+ hsocket_close(conn->sock);
+ httpc_free(conn);
+}
/*--------------------------------------------------
FUNCTION: httpc_free