wsio_core/lib.rs
1use tungstenite::protocol::WebSocketConfig;
2
3pub mod atomic;
4pub mod event;
5pub mod packet;
6pub mod types;
7pub mod utils;
8
9pub fn channel_capacity_from_websocket_config(websocket_config: &WebSocketConfig) -> usize {
10 (websocket_config.max_write_buffer_size / websocket_config.write_buffer_size).clamp(64, 4096)
11}