apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject svn commit: r125552 - /apr/apr/trunk/network_io/win32/sockopt.c
Date Tue, 18 Jan 2005 21:56:38 GMT
Author: bnicholes
Date: Tue Jan 18 13:56:37 2005
New Revision: 125552

URL: http://svn.apache.org/viewcvs?view=rev&rev=125552
Log:
Implement APR_TCP_DEFER_ACCEPT for NetWare and Win32
Modified:
   apr/apr/trunk/network_io/win32/sockopt.c

Modified: apr/apr/trunk/network_io/win32/sockopt.c
Url: http://svn.apache.org/viewcvs/apr/apr/trunk/network_io/win32/sockopt.c?view=diff&rev=125552&p1=apr/apr/trunk/network_io/win32/sockopt.c&r1=125551&p2=apr/apr/trunk/network_io/win32/sockopt.c&r2=125552
==============================================================================
--- apr/apr/trunk/network_io/win32/sockopt.c	(original)
+++ apr/apr/trunk/network_io/win32/sockopt.c	Tue Jan 18 13:56:37 2005
@@ -148,6 +148,21 @@
         }
         break;
     }
+    case APR_TCP_DEFER_ACCEPT:
+#if defined(TCP_DEFER_ACCEPT)
+        if (apr_is_option_set(sock, APR_TCP_DEFER_ACCEPT) != on) {
+            int optlevel = IPPROTO_TCP;
+            int optname = TCP_DEFER_ACCEPT;
+
+            if (setsockopt(sock->socketdes, optlevel, optname, 
+                           (void *)&on, sizeof(int)) == -1) {
+                return errno;
+            }
+            apr_set_option(sock, APR_TCP_DEFER_ACCEPT, on);
+        }
+#else
+        return APR_ENOTIMPL;
+#endif
     case APR_TCP_NODELAY:
         if (apr_is_option_set(sock, APR_TCP_NODELAY) != on) {
             int optlevel = IPPROTO_TCP;

Mime
View raw message