summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-29 15:55:04 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-11-29 15:55:04 (GMT)
commit4f8dc3d15c94e4c0bbc871695336845839578458 (patch)
tree18d44b898eae112c926e3dddf1e99e8a60282988
parentbaa7223bcd64bc092c51548caaef1fb52782ae52 (diff)
downloadcpython-4f8dc3d15c94e4c0bbc871695336845839578458.zip
cpython-4f8dc3d15c94e4c0bbc871695336845839578458.tar.gz
cpython-4f8dc3d15c94e4c0bbc871695336845839578458.tar.bz2
Add TCP_CONGESTION and TCP_USER_TIMEOUT
Issue #26273: Add new socket.TCP_CONGESTION (Linux 2.6.13) and socket.TCP_USER_TIMEOUT (Linux 2.6.37) constants. Patch written by Omar Sandoval.
-rw-r--r--Misc/NEWS4
-rw-r--r--Modules/socketmodule.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index c787c23..055bcad 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -160,6 +160,10 @@ Core and Builtins
Library
-------
+- Issue #26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
+ :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
+ Omar Sandoval.
+
- Issue #28752: Restored the __reduce__() methods of datetime objects.
- Issue #28727: Regular expression patterns, _sre.SRE_Pattern objects created
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 7f6cd4d..d5506a6 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -7540,6 +7540,12 @@ PyInit__socket(void)
#ifdef TCP_FASTOPEN
PyModule_AddIntMacro(m, TCP_FASTOPEN);
#endif
+#ifdef TCP_CONGESTION
+ PyModule_AddIntMacro(m, TCP_CONGESTION);
+#endif
+#ifdef TCP_USER_TIMEOUT
+ PyModule_AddIntMacro(m, TCP_USER_TIMEOUT);
+#endif
/* IPX options */
#ifdef IPX_TYPE