summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-11-08 13:53:00 +0100
committerMichael Adam <obnox@samba.org>2013-11-09 13:34:33 +0100
commit22587d3d41222ba3e4ca3cd755a8662ca7ff7479 (patch)
tree3e07f83b3cff0fcf372832abc7adaef9c410c041
parent0698e4d18006df53e5ca76a722e7d38bf9a227bf (diff)
downloadtinyproxy-22587d3d41222ba3e4ca3cd755a8662ca7ff7479.tar.gz
tinyproxy-22587d3d41222ba3e4ca3cd755a8662ca7ff7479.zip
sock: update introductory comment for listen_sock()
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to '')
-rw-r--r--src/sock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sock.c b/src/sock.c
index 8d7e90a..17f15fe 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -237,7 +237,13 @@ static int listen_on_one_socket(struct addrinfo *ad)
/*
* Start listening on a socket. Create a socket with the selected port.
- * The socket fd is returned upon success, -1 upon error.
+ * If the provided address is NULL, we may listen on multiple sockets,
+ * e.g. the wildcard addresse for IPv4 and IPv6, depending on what is
+ * supported. If the address is not NULL, we only listen on the first
+ * address reported by getaddrinfo that works.
+ *
+ * Upon success, the listen-fds are added to the listen_fds list
+ * and 0 is returned. Upon error, -1 is returned.
*/
int listen_sock (const char *addr, uint16_t port, vector_t listen_fds)
{