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

pub fn read_buffer_size of impl<F> WebSocketUpgrade<F> in extract/ws.rs not available to call, breaks tungstenite API #3262

Open
StarSapien opened this issue Mar 12, 2025 · 0 comments

Comments

@StarSapien
Copy link

pub fn read_buffer_size is not available to call in Axum using feature "ws", this breaks tungstenite API.

pub fn write_buffer_size and the rest of the methods are available to call except for fn read_buffer_size which is also marked as pub like the others.

impl WebSocketUpgrade {
/// Read buffer capacity. The default value is 128KiB
pub fn read_buffer_size(mut self, size: usize) -> Self {
self.config.read_buffer_size = size;
self
} ...not available to call

pub fn write_buffer_size ..available to call
...rest of the methods also available to call

This issue is likely related to snapview/tungstenite-rs#480 (Heavy memory usage difference between 0.24 and 0.25 #480)

In order for Axum users to reduce heavy memory usage when implementing WebSockets (which is the reason I'm filing this bug report), pub fn read_buffer_size must be available to call.

I'm using axum = { version = "0.8.1", features = ["ws"] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant