pub fn poll_without_shutdown(&mut self, cx: &mut task::Context<'_>) -> Poll<crate::Result<()>>
    where
        S: Unpin,
        S::Future: Unpin,
        B: Unpin,
    {
        loop {
            let polled = match *self.conn.as_mut().unwrap() {
                ProtoServer::H1(ref mut h1) => h1.poll_without_shutdown(cx),
                ProtoServer::H2(ref mut h2) => return Pin::new(h2).poll(cx).map_ok(|_| ()),
            };
            match ready!(polled) {
                Ok(()) => return Poll::Ready(Ok(())),
                Err(e) => match *e.kind() {
                    Kind::Parse(Parse::VersionH2) if self.fallback.to_h2() => {
                        self.upgrade_h2();
                        continue;
                    }
                    _ => return Poll::Ready(Err(e)),
                },
            }
        }
    }
/// Poll the connection for completion, but without calling `shutdown`
/// on the underlying IO.
///
/// This is useful to allow running a connection while doing an HTTP
/// upgrade. Once the upgrade is completed, the connection would be "done",
/// but it is not desired to actually shutdown the IO object. Instead you
/// would take it back using `into_parts`.
///
/// Use [`poll_fn`](https://docs.rs/futures/0.1.25/futures/future/fn.poll_fn.html)
/// and [`try_ready!`](https://docs.rs/futures/0.1.25/futures/macro.try_ready.html)
/// to work with this function; or use the `without_shutdown` wrapper.
Poll the connection for completion, but without calling `shutdown`
on the underlying IO.

This is useful to allow running a connection while doing an HTTP
upgrade. Once the upgrade is completed, the connection would be "done",
but it is not desired to actually shutdown the IO object. Instead you
would take it back using `into_parts`.


Poll the connection for completion but without calling ` shutdown ` on the underlying IO . This is useful to allow running a connection while doing an HTTP upgrade . Once the upgrade is completed the connection would be " done " but it is not desired to actually shutdown the IO object . Instead you would take it back using ` into_parts ` .
pub fn poll_without_shutdown(&mut self, cx: &mut task::Context<'_>) -> Poll<crate::Result<()>>
    where
        S: Unpin,
        S::Future: Unpin,
        B: Unpin,
    {
        loop {
            let polled = match *self.conn.as_mut().unwrap() {
                ProtoServer::H1(ref mut h1) => h1.poll_without_shutdown(cx),
                ProtoServer::H2(ref mut h2) => return Pin::new(h2).poll(cx).map_ok(|_| ()),
            };
            match ready!(polled) {
                Ok(()) => return Poll::Ready(Ok(())),
                Err(e) => match *e.kind() {
                    Kind::Parse(Parse::VersionH2) if self.fallback.to_h2() => {
                        self.upgrade_h2();
                        continue;
                    }
                    _ => return Poll::Ready(Err(e)),
                },
            }
        }
    }
pub fn poll_without_shutdown ( & mut self , cx : & mut task :: Context < ' _ > ) -> Poll < crate :: Result < ( ) > > where S : Unpin , S :: Future : Unpin , B : Unpin , { loop { let polled = match * self . conn . as_mut ( ) . unwrap ( ) { ProtoServer :: H1 ( ref mut h1 ) => h1 . poll_without_shutdown ( cx ) , ProtoServer :: H2 ( ref mut h2 ) => return Pin :: new ( h2 ) . poll ( cx ) . map_ok ( | _ | ( ) ) , } ; match ready ! ( polled ) { Ok ( ( ) ) => return Poll :: Ready ( Ok ( ( ) ) ) , Err ( e ) => match * e . kind ( ) { Kind :: Parse ( Parse :: VersionH2 ) if self . fallback . to_h2 ( ) => { self . upgrade_h2 ( ) ; continue ; } _ => return Poll :: Ready ( Err ( e ) ) , } , } } }
Poll the connection for completion, but without calling `shutdown`
on the underlying IO.
Poll the connection for completion but without calling ` shutdown ` on the underlying IO .
&mut self
cx
&mut task::Context<'_>
&mut self
cx
&mut task::Context<'_>