comparison 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
comparison
equal deleted inserted replaced
605:ad00f2bbb615 606:2cc5434a8ce0
69 { 69 {
70 struct 70 struct
71 { 71 {
72 char *host; 72 char *host;
73 struct hostent *hst; 73 struct hostent *hst;
74 int type; 74 int type, auth_type;
75 int port; 75 int port;
76 struct in_addr addr; 76 struct in_addr addr;
77 char *userid, *passwd; 77 char *userid, *passwd;
78 } proxy; 78 } proxy;
79 79
104 struct hostent *nn_resolve_host(nn_conn_t *conn, const char *name); 104 struct hostent *nn_resolve_host(nn_conn_t *conn, const char *name);
105 nn_conn_t * nn_conn_new( 105 nn_conn_t * nn_conn_new(
106 void (*errfunc)(nn_conn_t *conn, const char *msg), 106 void (*errfunc)(nn_conn_t *conn, const char *msg),
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, const char *userid, const char *passwd); 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_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);
111 void nn_conn_close(nn_conn_t *); 112 void nn_conn_close(nn_conn_t *);
112 void nn_conn_reset(nn_conn_t *); 113 void nn_conn_reset(nn_conn_t *);
113 int nn_conn_pull(nn_conn_t *); 114 int nn_conn_pull(nn_conn_t *);
114 BOOL nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len); 115 BOOL nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len);
116
115 BOOL nn_conn_send_msg(nn_conn_t *, const char *user, const char *str); 117 BOOL nn_conn_send_msg(nn_conn_t *, const char *user, const char *str);
116 BOOL nn_conn_send_msg_v(nn_conn_t *, const char *user, const char *fmt, ...); 118 BOOL nn_conn_send_msg_v(nn_conn_t *, const char *user, const char *fmt, ...);
117 BOOL nn_conn_check(nn_conn_t *); 119 BOOL nn_conn_check(nn_conn_t *);
118 120
119 121