From 08c7743bb8431033b180a872f39eb006db0933fd Mon Sep 17 00:00:00 2001 From: Kelly Thomas Kline Date: Thu, 15 Nov 2018 18:59:36 -0800 Subject: [PATCH] Add set_mailbox_capacity() function --- src/ws/context.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ws/context.rs b/src/ws/context.rs index 4db83df5c..5e207d43e 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -231,6 +231,13 @@ where pub fn handle(&self) -> SpawnHandle { self.inner.curr_handle() } + + /// Set mailbox capacity + /// + /// By default mailbox capacity is 16 messages. + pub fn set_mailbox_capacity(&mut self, cap: usize) { + self.inner.set_mailbox_capacity(cap) + } } impl WsWriter for WebsocketContext