From 11dd6048aa3dc94e9b709f638301b0ccfcd4b9ee Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 29 Nov 2016 16:55:04 +0100 Subject: 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. --- Misc/NEWS | 4 ++++ Modules/socketmodule.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 3577735..50a446a 100644 --- 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 diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 4c1d8f0..f4edc06 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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 -- cgit v0.12