diff network.h @ 613:2cd71b7c1e8e

Repurpose nn_conn_close() to only close the socket, but not free the connection structure. Add new function nn_conn_free() to do the freeing (also calls nn_conn_close()).
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 20 May 2014 06:50:12 +0300
parents 2cc5434a8ce0
children 1fc22e8efd26
line wrap: on
line diff
--- a/network.h	Tue May 20 06:20:43 2014 +0300
+++ b/network.h	Tue May 20 06:50:12 2014 +0300
@@ -109,7 +109,8 @@
 int         nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host, int auth_type);
 int         nn_conn_set_proxy_auth_user(nn_conn_t *conn, const char *userid, const char *passwd);
 int         nn_conn_open(nn_conn_t *conn, const int port, const char *host);
-void        nn_conn_close(nn_conn_t *);
+int         nn_conn_close(nn_conn_t *);
+void        nn_conn_free(nn_conn_t *);
 void        nn_conn_reset(nn_conn_t *);
 int         nn_conn_pull(nn_conn_t *);
 BOOL        nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len);