fn close_control_stream() {
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();

        let mut control_stream_closed = false;

        s.send_frame_client(
            frame::Frame::MaxPushId { push_id: 1 },
            s.client.control_stream_id.unwrap(),
            true,
        )
        .unwrap();

        loop {
            match s.server.poll(&mut s.pipe.server) {
                Ok(_) => (),

                Err(Error::Done) => {
                    break;
                },

                Err(Error::ClosedCriticalStream) => {
                    control_stream_closed = true;
                    break;
                },

                Err(_) => (),
            }
        }

        assert!(control_stream_closed);
    }
/// Client closes the control stream, which is forbidden.
Client closes the control stream, which is forbidden.
Client closes the control stream which is forbidden .
fn close_control_stream() {
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();
        let mut control_stream_closed = false;
        s.send_frame_client(
            frame::Frame::MaxPushId { push_id: 1 },
            s.client.control_stream_id.unwrap(),
            true,
        )
        .unwrap();
        loop {
            match s.server.poll(&mut s.pipe.server) {
                Ok(_) => (),
                Err(Error::Done) => {
                    break;
                },
                Err(Error::ClosedCriticalStream) => {
                    control_stream_closed = true;
                    break;
                },
                Err(_) => (),
            }
        }
        assert!(control_stream_closed);
    }
fn close_control_stream ( ) { let mut s = Session :: default ( ) . unwrap ( ) ; s . handshake ( ) . unwrap ( ) ; let mut control_stream_closed = false ; s . send_frame_client ( frame :: Frame :: MaxPushId { push_id : 1 } , s . client . control_stream_id . unwrap ( ) , true , ) . unwrap ( ) ; loop { match s . server . poll ( & mut s . pipe . server ) { Ok ( _ ) => ( ) , Err ( Error :: Done ) => { break ; } , Err ( Error :: ClosedCriticalStream ) => { control_stream_closed = true ; break ; } , Err ( _ ) => ( ) , } } assert ! ( control_stream_closed ) ; }
Client closes the control stream, which is forbidden.
Client closes the control stream which is forbidden .