/// We're a connection, and we have something to do.
We're a connection, and we have something to do.
We ' re a connection and we have something to do .
fn ready(
        &mut self,
        poll: &mut mio::Poll,
        ev: &mio::event::Event,
        hashmap: &mut HashMap<i32, i32>,
        conn: &mut DatabaseConnection,
    ) {
        // If we're readable: read some TLS.  Then
        // see if that yielded new plaintext.  Then
        // see if the backend is readable too.
        if ev.readiness().is_readable() {
            self.do_tls_read();
            self.try_plain_read(hashmap, conn);
            self.try_back_read();
        }
        if ev.readiness().is_writable() {
            self.do_tls_write();
        }
        if self.closing {
            let _ = self.socket.shutdown(Shutdown::Both);
            self.close_back();
            self.closed = true;
        } else {
            self.reregister(poll);
        }
    }
fn ready ( & mut self , poll : & mut mio :: Poll , ev : & mio :: event :: Event , hashmap : & mut HashMap < i32 , i32 > , conn : & mut DatabaseConnection , ) { // If we're readable: read some TLS.  Then // see if that yielded new plaintext.  Then // see if the backend is readable too. if ev . readiness ( ) . is_readable ( ) { self . do_tls_read ( ) ; self . try_plain_read ( hashmap , conn ) ; self . try_back_read ( ) ; } if ev . readiness ( ) . is_writable ( ) { self . do_tls_write ( ) ; } if self . closing { let _ = self . socket . shutdown ( Shutdown :: Both ) ; self . close_back ( ) ; self . closed = true ; } else { self . reregister ( poll ) ; } }
We're a connection, and we have something to do.
We ' re a connection and we have something to do .
&mut self
poll
&mut mio::Poll
ev
&mio::event::Event
hashmap
&mut HashMap<i32, i32>
conn
&mut DatabaseConnection