]> granicus.if.org Git - python/commitdiff
Add TCP_CONGESTION and TCP_USER_TIMEOUT
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 29 Nov 2016 15:55:04 +0000 (16:55 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 29 Nov 2016 15:55:04 +0000 (16:55 +0100)
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.

Misc/NEWS
Modules/socketmodule.c

index 35777356e055dc2c1295bb6514d0ccf20a128c28..50a446ad9de7c57e06de45312d9a89d1b046682a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,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
index 4c1d8f00343e43f716744cf53dd109d94b95cd4b..f4edc062fd65397cfdf9582494f0fe18373794ec 100644 (file)
@@ -7512,6 +7512,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