search for: maxsock

Displaying 1 result from an estimated 1 matches for "maxsock".

Did you mean: maxstock
2003 Mar 05
0
"rsync --daemon" and IPv4/v6 dual stack
...ntf(FERROR, RSYNC_NAME ": open inbound socket on port %d failed: " - "%s\n", - port, - strerror(errno)); - - freeaddrinfo(all_ai); - return -1; + return s; } @@ -371,24 +342,52 @@ return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); } +#define MAXSOCK 20 void start_accept_loop(int port, int (*fn)(int )) { - int s; + int s[MAXSOCK]; + int nsock = 0; + int maxsock = -1; extern char *bind_address; extern int default_af_hint; + struct addrinfo hints, *res, *res0; + char portstr[NI_MAXSERV]; + int i; - /* open an incoming socket */ - s = op...