comparison network.h @ 599:eeea75b8b6f3

Implement proxy user id setting.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 08 May 2014 16:14:09 +0300
parents f9fb2a96a0c9
children 4bae14092b78
comparison
equal deleted inserted replaced
598:1e10031cf2d5 599:eeea75b8b6f3
79 char *host; 79 char *host;
80 struct hostent *hst; 80 struct hostent *hst;
81 int type; 81 int type;
82 int port; 82 int port;
83 struct in_addr addr; 83 struct in_addr addr;
84 char *userid;
84 } proxy; 85 } proxy;
85 86
86 char *host; 87 char *host;
87 struct hostent *hst; 88 struct hostent *hst;
88 int port; 89 int port;
110 struct hostent *nn_resolve_host(nn_conn_t *conn, const char *name); 111 struct hostent *nn_resolve_host(nn_conn_t *conn, const char *name);
111 nn_conn_t * nn_conn_new( 112 nn_conn_t * nn_conn_new(
112 void (*errfunc)(nn_conn_t *conn, const char *msg), 113 void (*errfunc)(nn_conn_t *conn, const char *msg),
113 void (*msgfunc)(nn_conn_t *conn, const char *msg)); 114 void (*msgfunc)(nn_conn_t *conn, const char *msg));
114 115
115 int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host); 116 int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host, const char *userid);
116 int nn_conn_open(nn_conn_t *conn, const int port, const char *host); 117 int nn_conn_open(nn_conn_t *conn, const int port, const char *host);
117 void nn_conn_close(nn_conn_t *); 118 void nn_conn_close(nn_conn_t *);
118 void nn_conn_reset(nn_conn_t *); 119 void nn_conn_reset(nn_conn_t *);
119 int nn_conn_pull(nn_conn_t *); 120 int nn_conn_pull(nn_conn_t *);
120 BOOL nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len); 121 BOOL nn_conn_send_buf(nn_conn_t *, const char *buf, const size_t len);