Mercurial > hg > nnchat
changeset 458:6eef0dc83f0a
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 26 May 2012 05:33:06 +0300 |
parents | 69ce77696c5d |
children | 75ed7be2cfe8 |
files | network.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/network.c Sat May 26 05:31:36 2012 +0300 +++ b/network.c Sat May 26 05:33:06 2012 +0300 @@ -92,6 +92,7 @@ struct hostent *nn_resolve_host(nn_conn_t *conn, const char *name) { struct hostent *res = gethostbyname(name); + if (res == NULL) nn_conn_err(conn, "Could not resolve hostname '%s': %s\n", name, strerror(h_errno)); else @@ -116,6 +117,7 @@ return conn; } + static BOOL nn_get_addr(struct in_addr *addr, struct hostent *hst) { if (hst != NULL) @@ -130,6 +132,7 @@ } } + int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host) { if (conn == NULL) @@ -150,6 +153,7 @@ return 0; } + int nn_conn_open(nn_conn_t *conn, const int port, const char *host) { struct sockaddr_in dest;