-
Notifications
You must be signed in to change notification settings - Fork 429
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
[Feature Request] Resize TCP socket buffer dynamically after TCP socket has been created #927
Comments
I'm not sure what feature you're requesting:
|
Thanks for your replying. What I want to achieve is the following:
Is this already possible? |
ah okay! you want to dynamically change the buffer size after the TCP socket has already been created. Makes sense. Unfortunately that's not possible now, no. Doing it if the buffer is borrowed might be hard, but should be doable if it's an owned Vec. |
Then can we add such an API for sockets with owned Vec or fn replace_recv_buf<T: Into<SocketBuffer<'static>>(&mut self, new_buffer: T)->Option<SocketBuffer<'static>> ? Enabling this feature will be helpful to memory-constraint devices with skewed bandwidth needs. |
sure! pull reuquests welcome |
Currently, the buffer for TCP socket needs to be preallocated in
socket::tcp::Socket::new()
and I found nowhere to change its size. However, a configurable window size is necessary to achieve a balance between good bandwidth and low memory footprint. I notice that TCP window scaling (RFC 1323) is advertised to be implemented but it seems it's only properly implemented for the remote endpoint. Can this feature be implemented in local side?The text was updated successfully, but these errors were encountered: