-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
No option to choose buffer capacity for copy_bidrectional #6454
Comments
What about a new I don't think it's possible to have a new function like io::copy_buf because in the case of |
It seems like some time ago people agreed that we could just make another function that would take the size but the naming is the issue: #3572 (comment) |
There is File::set_max_buf_size. We can take it as a reference and name the new function like |
This would be even better since it will allow raw FD instead of BufReader. |
I think a better name for the function is |
No really sure on this one because, It's hard to say what best name for it is. I thought also about |
Yeah, I don't think |
_ARD_ uses _MVS_ video codec which doesn't like buffering, and we need to have the buffer as minimal as possible. Also, this commit adds new `copy_bidirectional` transport that is forked [the one from tokio](https://docs.rs/tokio/latest/tokio/io/fn.copy_bidirectional.html). It's forked because the original function doesn't allow overriding the buffer size (8K is used by default). There is [an issue](tokio-rs/tokio#6454) on tokio side for it. We will be able to replace our fork with the upstream easily when it's ready. Releated to Devolutions/IronVNC#338.
Maybe |
It might not be the best solution since we wouldn't pass a |
I guess something similar to your original suggestion like |
@Darksonn Does |
Yes. |
This is the same as `copy_bidirectional` but accepts the `a` -> `b` and `b` -> `a` buffers sizes. `copy_bidirectional` uses 8Kb buffers under the hood which isn't configurable. `copy_bidirectional_with_size` fixes it by allowing an user to set its own sizes for underlying buffers. Fixes: tokio-rs#6454.
This is the same as `copy_bidirectional` but accepts the `a` -> `b` and `b` -> `a` buffers sizes. `copy_bidirectional` uses 8Kb buffers under the hood which isn't configurable. `copy_bidirectional_with_size` fixes it by allowing an user to set its own sizes for underlying buffers. Fixes: tokio-rs#6454. Refs: tokio-rs#3572.
Is your feature request related to a problem? Please describe.
io::copy_bidirectional
uses it's own sizes (8KB) without caring about the reader/writer buffer capacities.Describe the solution you'd like
A new function like
io::copy_buf
only for bidirectional writes/reads is requested if possible.Describe alternatives you've considered
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: