From 0c90df89dea0613d6f25b985fa541ffbb91444be 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 6e9e344..fc66c1f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -267,6 +267,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