Mercurial > hg > nnchat
comparison 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 |
comparison
equal
deleted
inserted
replaced
612:59588bbf8d55 | 613:2cd71b7c1e8e |
---|---|
107 void (*msgfunc)(nn_conn_t *conn, const char *msg)); | 107 void (*msgfunc)(nn_conn_t *conn, const char *msg)); |
108 | 108 |
109 int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host, int auth_type); | 109 int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host, int auth_type); |
110 int nn_conn_set_proxy_auth_user(nn_conn_t *conn, const char *userid, const char *passwd); | 110 int nn_conn_set_proxy_auth_user(nn_conn_t *conn, const char *userid, const char *passwd); |
111 int nn_conn_open(nn_conn_t *conn, const int port, const char *host); | 111 int nn_conn_open(nn_conn_t *conn, const int port, const char *host); |
112 void nn_conn_close(nn_conn_t *); | 112 int nn_conn_close(nn_conn_t *); |
113 void nn_conn_free(nn_conn_t *); | |
113 void nn_conn_reset(nn_conn_t *); | 114 void nn_conn_reset(nn_conn_t *); |
114 int nn_conn_pull(nn_conn_t *); | 115 int nn_conn_pull(nn_conn_t *); |
115 BOOL nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len); | 116 BOOL nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len); |
116 | 117 |
117 BOOL nn_conn_send_msg(nn_conn_t *, const char *user, const char *str); | 118 BOOL nn_conn_send_msg(nn_conn_t *, const char *user, const char *str); |