gh-91498: socket: Add TCP_CONNECTION_INFO on macOS (#69256)

Fixes GH-91498
This commit is contained in:
David CARLIER 2022-04-27 13:47:17 +01:00 committed by GitHub
parent b733708ca3
commit ad9f817eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -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_*

View File

@ -0,0 +1 @@
Add the ``TCP_CONNECTION_INFO`` option (available on macOS) to :mod:`socket`.

View File

@ -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