summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index adcda4f..864d477 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -319,29 +319,6 @@ Tcl_GetHostName(void)
/*
* ----------------------------------------------------------------------
*
- * TclpHasSockets --
- *
- * Detect if sockets are available on this platform.
- *
- * Results:
- * Returns TCL_OK.
- *
- * Side effects:
- * None.
- *
- * ----------------------------------------------------------------------
- */
-
-int
-TclpHasSockets(
- TCL_UNUSED(Tcl_Interp *))
-{
- return TCL_OK;
-}
-
-/*
- * ----------------------------------------------------------------------
- *
* TclpFinalizeSockets --
*
* Performs per-thread socket subsystem finalization.
@@ -1670,6 +1647,7 @@ Tcl_OpenTcpServerEx(
const char *service, /* Port number to open. */
const char *myHost, /* Name of local host. */
unsigned int flags, /* Flags. */
+ int backlog, /* Length of OS listen backlog queue. */
Tcl_TcpAcceptProc *acceptProc,
/* Callback for accepting connections from new
* clients. */
@@ -1835,7 +1813,10 @@ Tcl_OpenTcpServerEx(
chosenport = ntohs(sockname.sa4.sin_port);
}
}
- status = listen(sock, SOMAXCONN);
+ if (backlog < 0) {
+ backlog = SOMAXCONN;
+ }
+ status = listen(sock, backlog);
if (status < 0) {
if (howfar < LISTEN) {
howfar = LISTEN;