Skip to content

socket: add TCP_KEEPALIVE #8100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stdlib/_socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ TCP_SYNCNT: int
TCP_WINDOW_CLAMP: int
if sys.version_info >= (3, 7):
TCP_NOTSENT_LOWAT: int
if sys.version_info >= (3, 10) and sys.platform == "darwin":
TCP_KEEPALIVE: int
if sys.version_info >= (3, 11) and sys.platform == "darwin":
TCP_CONNECTION_INFO: int

Expand Down
2 changes: 2 additions & 0 deletions stdlib/socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ if sys.platform != "win32":
from _socket import CMSG_LEN as CMSG_LEN, CMSG_SPACE as CMSG_SPACE, sethostname as sethostname
if sys.platform != "win32" or sys.version_info >= (3, 8):
from _socket import if_indextoname as if_indextoname, if_nameindex as if_nameindex, if_nametoindex as if_nametoindex
if sys.platform == "darwin" and sys.version_info >= (3, 10):
from _socket import TCP_KEEPALIVE as TCP_KEEPALIVE
if sys.platform == "linux":
from _socket import (
ALG_OP_DECRYPT as ALG_OP_DECRYPT,
Expand Down