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

Misleading documentation for Builder::max_frame_length. #4340

Closed
dvdsk opened this issue Dec 24, 2021 · 1 comment · Fixed by #4352
Closed

Misleading documentation for Builder::max_frame_length. #4340

dvdsk opened this issue Dec 24, 2021 · 1 comment · Fixed by #4352
Labels
A-tokio Area: The main tokio crate A-tokio-util Area: The tokio-util crate C-bug Category: This is a bug. E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. M-codec Module: tokio-util/codec

Comments

@dvdsk
Copy link
Contributor

dvdsk commented Dec 24, 2021

Version
tokio-util current master (78e0f0b42a4f7a50f3986f576703e5a3cb473b79)

Platform
Linux ubuntu 5.11.0-1023-raspi #25-Ubuntu SMP PREEMPT Fri Nov 19 07:45:23 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Description
The documentation of max_frame_length has a misleading example.

In the example it states the default value for frame length 8MB, this is correct (see: source). Then the example sets the value to 1024*8. Since max_frame_length is just a setter source the frame length is now 8KB.

I inferred from this that the frame length is set in KB. I would suggest adjusting the example to set a value of 8 * 1024 * 1024 and mentioning it is the size in bytes.

I would be happy to pull request such a change, let me know.

@dvdsk dvdsk added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Dec 24, 2021
@Darksonn Darksonn added A-tokio-util Area: The tokio-util crate E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. M-codec Module: tokio-util/codec labels Dec 25, 2021
@Darksonn
Copy link
Contributor

You are welcome to submit such a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate A-tokio-util Area: The tokio-util crate C-bug Category: This is a bug. E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. M-codec Module: tokio-util/codec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants