-
Notifications
You must be signed in to change notification settings - Fork 743
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_{send, recv}_buffer_size
#1384
Conversation
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Can you also add the getters and a simple round-trip test? |
Sure, will do! |
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
8eea949
to
d7da7cd
Compare
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
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.
LGTM, see my comment in the test to fix the CI.
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
apparently two casts are required for this because it's a `*mut i8` Signed-off-by: Eliza Weisman <eliza@buoyant.io>
It looks like one of the test is failing on FreeBSD CI:
It seems quite unlikely that the changes in this PR could have actually broken this, since the test that's failing doesn't do anything related to send/recv buffer size: Lines 473 to 506 in 7358a31
I'm guessing this is flaky, so I went ahead and restarted it. @Thomasdezeeuw have you seen this test failing spuriously before? |
This commit adds `set_{send, recv}_buffer_size` methods to `TcpSocket` for setting the size of the TCP send and receive buffers, and `{send, recv}_buffer_size` methods for returning the current value. These just call into similar methods on `mio`'s `TcpSocket` type, which were added in tokio-rs/mio#1384. Refs: #3082 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit adds `set_{send, recv}_buffer_size` methods to `TcpSocket` for setting the size of the TCP send and receive buffers, and `{send, recv}_buffer_size` methods for returning the current value. These just call into similar methods on `mio`'s `TcpSocket` type, which were added in tokio-rs/mio#1384. Refs: #3082 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit adds `set_{send, recv}_buffer_size` methods to `TcpSocket` for setting the size of the TCP send and receive buffers, and `{send, recv}_buffer_size` methods for returning the current value. These just call into similar methods on `mio`'s `TcpSocket` type, which were added in tokio-rs/mio#1384. Refs: #3082 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit adds methods for setting
SO_RECVBUF
andSO_SNDBUF
toMio's
TcpSocket
type. It would be nice to eventually expose these inTokio, so adding them to Mio is the first step.
See tokio-rs/tokio#3082 for details.
Signed-off-by: Eliza Weisman eliza@buoyant.io