Skip to content

Commit 11dd604

Browse files
committed
Add TCP_CONGESTION and TCP_USER_TIMEOUT
Issue python#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.
1 parent 9ec0772 commit 11dd604

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Core and Builtins
7474
Library
7575
-------
7676

77+
- Issue #26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
78+
:data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
79+
Omar Sandoval.
80+
7781
- Issue #28752: Restored the __reduce__() methods of datetime objects.
7882

7983
- Issue #28727: Regular expression patterns, _sre.SRE_Pattern objects created

Modules/socketmodule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7512,6 +7512,12 @@ PyInit__socket(void)
75127512
#ifdef TCP_FASTOPEN
75137513
PyModule_AddIntMacro(m, TCP_FASTOPEN);
75147514
#endif
7515+
#ifdef TCP_CONGESTION
7516+
PyModule_AddIntMacro(m, TCP_CONGESTION);
7517+
#endif
7518+
#ifdef TCP_USER_TIMEOUT
7519+
PyModule_AddIntMacro(m, TCP_USER_TIMEOUT);
7520+
#endif
75157521

75167522
/* IPX options */
75177523
#ifdef IPX_TYPE

0 commit comments

Comments
 (0)