Hi tech@, Since netcat can only process one connection at one time, maybe UNIX-domain socket can use the same backlog parameter for listen() function as network socket, thanks!
diff --git netcat.c netcat.c
index 341e7e5..b6fd199 100644
--- netcat.c
+++ netcat.c
@@ -894,7 +894,7 @@ unix_listen(char *path)
if ((s = unix_bind(path, 0)) < 0)
return -1;
- if (listen(s, 5) < 0) {
+ if (listen(s, 1) < 0) {
close(s);
return -1;
}
--
Best Regards
Nan Xiao
