Skip to content
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

Use a windows specific keepalive function. #1104

Merged
merged 2 commits into from
Sep 3, 2022
Merged

Conversation

michael-grunder
Copy link
Collaborator

While it is possible to toggle TCP_KEEPALIVE in windows via
setsockopt, you have to use WSAIoctl to set the interval.

Since WSAIoctl can actually do all of this in one call (toggle the
option, and set the corresponding interval), just use that in Windows
and avoid the call to setsockopt alltogether.

See: #1100

While it is possible to toggle `TCP_KEEPALIVE` in windows via
setsockopt, you have to use `WSAIoctl` to set the interval.

Since `WSAIoctl` can actually do all of this in one call (toggle the
option, and set the corresponding interval), just use that in Windows
and avoid the call to `setsockopt` alltogether.

See: #1100
@michael-grunder michael-grunder merged commit 61b5b29 into master Sep 3, 2022
@michael-grunder michael-grunder deleted the win32-keepalive branch September 3, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant