From 5445e341c34f313b8028c6e4f068424044b4c332 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Mon, 1 Jul 2019 22:37:59 +0600 Subject: [PATCH] give access to io object during connect stage --- actix-ioframe/src/connect.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actix-ioframe/src/connect.rs b/actix-ioframe/src/connect.rs index 29190228..d7f403c2 100644 --- a/actix-ioframe/src/connect.rs +++ b/actix-ioframe/src/connect.rs @@ -51,6 +51,16 @@ impl ConnectResult { &self.sink } + #[inline] + pub fn get_ref(&self) -> &Io { + self.framed.get_ref() + } + + #[inline] + pub fn get_mut(&mut self) -> &mut Io { + self.framed.get_mut() + } + #[inline] pub fn state(self, state: S) -> ConnectResult { ConnectResult {