summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xDoc/library/socket.rst4
-rw-r--r--Misc/NEWS.d/next/Library/2022-04-10-08-39-44.bpo-91498.8oII92.rst1
-rw-r--r--Modules/socketmodule.c3
3 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index cff5a32..3b1912c 100755
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -388,6 +388,10 @@ Constants
Added ``TCP_KEEPALIVE``. On MacOS this constant can be used in the same
way that ``TCP_KEEPIDLE`` is used on Linux.
+ .. versionchanged:: 3.11
+ Added ``TCP_CONNECTION_INFO``. On MacOS this constant can be used in the
+ same way that ``TCP_INFO`` is used on Linux and BSD.
+
.. data:: AF_CAN
PF_CAN
SOL_CAN_*
diff --git a/Misc/NEWS.d/next/Library/2022-04-10-08-39-44.bpo-91498.8oII92.rst b/Misc/NEWS.d/next/Library/2022-04-10-08-39-44.bpo-91498.8oII92.rst
new file mode 100644
index 0000000..df3b81f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-04-10-08-39-44.bpo-91498.8oII92.rst
@@ -0,0 +1 @@
+Add the ``TCP_CONNECTION_INFO`` option (available on macOS) to :mod:`socket`.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index c7bc10b..9ecabaf 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -8213,6 +8213,9 @@ PyInit__socket(void)
#ifdef TCP_INFO
PyModule_AddIntMacro(m, TCP_INFO);
#endif
+#ifdef TCP_CONNECTION_INFO
+ PyModule_AddIntMacro(m, TCP_CONNECTION_INFO);
+#endif
#ifdef TCP_QUICKACK
PyModule_AddIntMacro(m, TCP_QUICKACK);
#endif