From e131ec4e8a983119620289bb5228d2f23230e316 Mon Sep 17 00:00:00 2001 From: Naja Melan Date: Sat, 28 Mar 2020 11:58:50 +0100 Subject: [PATCH] Expose the configuration of the websocket connection. Allows wrapper types to respect max_message_size. --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 513b15f..427a212 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -271,6 +271,12 @@ impl WebSocketStream { self.inner.get_mut().get_mut() } + /// Returns a reference to the configuration of the tungstenite stream. + pub fn get_config(&self) -> &WebSocketConfig + { + self.inner.get_config() + } + /// Close the underlying web socket pub async fn close(&mut self, msg: Option>) -> Result<(), WsError> where