]> granicus.if.org Git - python/commitdiff
expose TCP_FASTOPEN and MSG_FASTOPEN
authorBenjamin Peterson <benjamin@python.org>
Thu, 13 Dec 2012 03:24:47 +0000 (22:24 -0500)
committerBenjamin Peterson <benjamin@python.org>
Thu, 13 Dec 2012 03:24:47 +0000 (22:24 -0500)
Misc/NEWS
Modules/socketmodule.c

index 2a9c00dde0c37f01f3a20ee022ac889f5142a84c..93bb7c66e1df57fd9199ed21f3511c9b76588663 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -163,6 +163,9 @@ Core and Builtins
 Library
 -------
 
+- Expose the TCP_FASTOPEN and MSG_FASTOPEN flags in socket when they're
+  available.
+
 - Issue #15701: Add a .headers attribute to urllib.error.HTTPError. Patch
   contributed by Berker Peksag.
 
index 1c3396fd53e0582dd2122cedb9dcdcd73d5a70e3..99c07cb3e5a59e583310b16883f0c90e016cdd7a 100644 (file)
@@ -5971,6 +5971,9 @@ PyInit__socket(void)
 #ifdef  MSG_MCAST
     PyModule_AddIntConstant(m, "MSG_MCAST", MSG_MCAST);
 #endif
+#ifdef MSG_FASTOPEN
+    PyModule_AddIntConstant(m, "MSG_FASTOPEN", MSG_FASTOPEN);
+#endif
 
     /* Protocol level and numbers, usable for [gs]etsockopt */
 #ifdef  SOL_SOCKET
@@ -6401,7 +6404,9 @@ PyInit__socket(void)
 #ifdef  TCP_QUICKACK
     PyModule_AddIntConstant(m, "TCP_QUICKACK", TCP_QUICKACK);
 #endif
-
+#ifdef  TCP_FASTOPEN
+    PyModule_AddIntConstant(m, "TCP_FASTOPEN", TCP_FASTOPEN);
+#endif
 
     /* IPX options */
 #ifdef  IPX_TYPE