[Python-checkins] cpython: expose TCP_FASTOPEN and MSG_FASTOPEN
benjamin.peterson
python-checkins at python.org
Thu Dec 13 04:24:54 CET 2012
http://hg.python.org/cpython/rev/5435a9278028
changeset: 80834:5435a9278028
user: Benjamin Peterson <benjamin at python.org>
date: Wed Dec 12 22:24:47 2012 -0500
summary:
expose TCP_FASTOPEN and MSG_FASTOPEN
files:
Misc/NEWS | 3 +++
Modules/socketmodule.c | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -163,6 +163,9 @@
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.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -5971,6 +5971,9 @@
#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 @@
#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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list