-
Notifications
You must be signed in to change notification settings - Fork 723
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
net: add TcpSocket::{set, get}_keepalive
#1385
Merged
Merged
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
6c00878
net: add `TcpSocket::{set, get}_keepalive`
hawkw f5c0857
make rustfmt happy
hawkw 93b45d7
windows: use i32::max_value
hawkw b9a3a52
fixup windows
hawkw 04cd34f
maybe these pointer casts will be good
hawkw 0f52a28
fix WSAIoctl argument order etc
hawkw 20a018c
tcp: add separate APIs for every keepalive option
hawkw eb8ed01
add doc_cfg
hawkw e769f9d
undo rustfmt
hawkw 7c14e89
apparently Macs do have TCP_KEEPINTVL/TCP_KEEPCNT
hawkw 51164b7
fix shell rt cfgs
hawkw 600a662
fix missing target_os cfgs
hawkw 21c4c7b
????
hawkw dcbd0ec
maybe we can at least see what's going on
hawkw bbeac6f
maybe this has to be a valid ptr???
hawkw f0a704b
asdf
hawkw 2f9a2a4
more println
hawkw d251450
agh
hawkw 9bfad08
hmm let's see what happens if we use getsockopt
hawkw 21ff829
also remove printlns
hawkw 4c1b6a9
oops
hawkw a75330c
lol oh no it's in a different header entirely
hawkw 096fd96
AGH NO IT WAS A *char ALL ALONG
hawkw 018336d
fsdjal
hawkw 322c0b6
it was suggested that I try WSPIoctl
hawkw ff15a1b
switch to a builder API because winsock is awful
hawkw 7b9163b
fixup doctest
hawkw ff49a10
Merge branch 'master' into eliza/even-more-sockopts
hawkw 3effa9b
rustfmt
hawkw ea2dee9
oops
hawkw 0444d5d
fix merge mistake
hawkw 9570c7d
windows fixup
hawkw 942a53d
blurgh, shell
hawkw b83957d
nicer cfgs
hawkw 884bf67
Merge branch 'master' into eliza/even-more-sockopts
hawkw 91d9e9b
unix: just forward inner errors
hawkw 605d07a
add platform notes
hawkw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a
# Notes
section saying that all parameters related to keepalive will be overwritten.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that's actually only the case on Windows; on Unix, we can avoid overwriting previously set parameters. Do you think we should have the same behavior on Unix OSes even though it's less than ideal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change it to that it might overwrite other keepalive parameters and that either only a single call should be made, or that all desired parameters should be set in all calls. I don't want to make unnecessary system calls on Unix.