fn poll_match_client_hello(&mut self) -> Poll<conditional_accept::Match, io::Error> {
        let sz = try_ready!(self.socket.read_buf(&mut self.peek_buf));
        if sz == 0 {
            // XXX: It is ambiguous whether this is the start of a TLS handshake or not.
            // For now, resolve the ambiguity in favor of plaintext. TODO: revisit this
            // when we add support for TLS policy.
            return Ok(conditional_accept::Match::NotMatched.into());
        }

        let buf = self.peek_buf.as_ref();
        Ok(conditional_accept::match_client_hello(buf, &self.server_name).into())
    }
/// Polls the underlying socket for more data and buffers it.
///
/// The buffer is matched for a TLS client hello message.
///
/// `NotMatched` is returned if the underlying socket has closed.
Polls the underlying socket for more data and buffers it.
The buffer is matched for a TLS client hello message.

`NotMatched` is returned if the underlying socket has closed.
Polls the underlying socket for more data and buffers it . The buffer is matched for a TLS client hello message . ` NotMatched ` is returned if the underlying socket has closed .
fn poll_match_client_hello(&mut self) -> Poll<conditional_accept::Match, io::Error> {
        let sz = try_ready!(self.socket.read_buf(&mut self.peek_buf));
        if sz == 0 {
            // XXX: It is ambiguous whether this is the start of a TLS handshake or not.
            // For now, resolve the ambiguity in favor of plaintext. TODO: revisit this
            // when we add support for TLS policy.
            return Ok(conditional_accept::Match::NotMatched.into());
        }
        let buf = self.peek_buf.as_ref();
        Ok(conditional_accept::match_client_hello(buf, &self.server_name).into())
    }
fn poll_match_client_hello ( & mut self ) -> Poll < conditional_accept :: Match , io :: Error > { let sz = try_ready ! ( self socket read_buf ( mut self peek_buf ) ) ; if sz == 0 { // XXX: It is ambiguous whether this is the start of a TLS handshake or not. // For now, resolve the ambiguity in favor of plaintext. TODO: revisit this // when we add support for TLS policy. return Ok ( conditional_accept :: Match :: NotMatched . into ( ) ) ; } let buf = self . peek_buf . as_ref ( ) ; Ok ( conditional_accept :: match_client_hello ( buf , & self . server_name ) . into ( ) ) }
Polls the underlying socket for more data and buffers it.
Polls the underlying socket for more data and buffers it .
&mut self
&mut self