fn read<H: Handler>(
        &mut self, 
        buf: &mut [u8], 
        event_loop: &mut EventLoop<H>) -> Result<usize> {
        match self.stream.ssl_read(buf) {
            Err(ssl::error::Error::WantRead(_)) => {
                self.state = ArrowStreamState::ReaderWantRead;
                self.enable_socket_events(true, false, event_loop);
                Ok(0)
            },
            Err(ssl::error::Error::WantWrite(_)) => {
                self.state = ArrowStreamState::ReaderWantWrite;
                self.enable_socket_events(false, true, event_loop);
                Ok(0)
            },
            other => {
                self.state = ArrowStreamState::Ok;
                self.enable_socket_events(true, true, event_loop);
                Ok(try_io!(other))
            }
        }
    }
/// Read available data from the underlaying SSL stream into a given 
/// buffer.
Read available data from the underlaying SSL stream into a given
buffer.
Read available data from the underlaying SSL stream into a given buffer .
fn read<H: Handler>(
        &mut self, 
        buf: &mut [u8], 
        event_loop: &mut EventLoop<H>) -> Result<usize> {
        match self.stream.ssl_read(buf) {
            Err(ssl::error::Error::WantRead(_)) => {
                self.state = ArrowStreamState::ReaderWantRead;
                self.enable_socket_events(true, false, event_loop);
                Ok(0)
            },
            Err(ssl::error::Error::WantWrite(_)) => {
                self.state = ArrowStreamState::ReaderWantWrite;
                self.enable_socket_events(false, true, event_loop);
                Ok(0)
            },
            other => {
                self.state = ArrowStreamState::Ok;
                self.enable_socket_events(true, true, event_loop);
                Ok(try_io!(other))
            }
        }
    }
fn read < H : Handler > ( & mut self , buf : & mut [ u8 ] , event_loop : & mut EventLoop < H > ) -> Result < usize > { match self . stream . ssl_read ( buf ) { Err ( ssl :: error :: Error :: WantRead ( _ ) ) => { self . state = ArrowStreamState :: ReaderWantRead ; self . enable_socket_events ( true , false , event_loop ) ; Ok ( 0 ) } , Err ( ssl :: error :: Error :: WantWrite ( _ ) ) => { self . state = ArrowStreamState :: ReaderWantWrite ; self . enable_socket_events ( false , true , event_loop ) ; Ok ( 0 ) } , other => { self . state = ArrowStreamState :: Ok ; self . enable_socket_events ( true , true , event_loop ) ; Ok ( try_io ! ( other ) ) } } }
Read available data from the underlaying SSL stream into a given
buffer.
Read available data from the underlaying SSL stream into a given buffer .
&mut self
buf
&mut [u8]
event_loop
&mut EventLoop<H>
&mut self
buf
&mut [u8]
event_loop
&mut EventLoop<H>