Mercurial > hg > nnchat
diff network.h @ 606:2cc5434a8ce0
Change proxy authentication handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 20 May 2014 04:34:23 +0300 |
parents | ad00f2bbb615 |
children | 2cd71b7c1e8e |
line wrap: on
line diff
--- a/network.h Tue May 20 02:11:05 2014 +0300 +++ b/network.h Tue May 20 04:34:23 2014 +0300 @@ -71,7 +71,7 @@ { char *host; struct hostent *hst; - int type; + int type, auth_type; int port; struct in_addr addr; char *userid, *passwd; @@ -106,12 +106,14 @@ void (*errfunc)(nn_conn_t *conn, const char *msg), void (*msgfunc)(nn_conn_t *conn, const char *msg)); -int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host, const char *userid, const char *passwd); +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 *); 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); + BOOL nn_conn_send_msg(nn_conn_t *, const char *user, const char *str); BOOL nn_conn_send_msg_v(nn_conn_t *, const char *user, const char *fmt, ...); BOOL nn_conn_check(nn_conn_t *);