pub fn handle_message(
        &self,
        received_buf: &[u8],
        response_buf: &mut [u8],
        over_tcp: bool,
    ) -> Response {
        if let Ok(received) = Reader::try_from(received_buf) {
            // We currently only support standard queries.
            if received.opcode() == Opcode::Query {
                self.handle_query(received, response_buf, over_tcp)
            } else {
                generate_error(&received, None, Rcode::NotImp, response_buf)
            }
        } else {
            // Ignore messages that do not contain a full DNS header.
            Response::None
        }
    }
/// Handles a received DNS message. This is the API through which
/// I/O providers submit messages.
///
/// `received_buf` contains the message received. `response_buf` is
/// a buffer into which a response message may be serialized. Its
/// length is interpreted as the maximum size of a DNS message the
/// caller is willing to send. To comply with the DNS specification,
/// it should be at least 512 octets long for UDP transport. For TCP
/// transport, the maximum possible size (65,535 octets) should be
/// used. `over_tcp` specifies whether the underlying transport was
/// TCP (`true`) or UDP (`false`).
///
/// A [`Response`] is returned, signifying whether a response is to
/// be sent and, if so, how long the response message written into
/// `response_buf` is.
Handles a received DNS message. This is the API through which
I/O providers submit messages.

`received_buf` contains the message received. `response_buf` is
a buffer into which a response message may be serialized. Its
length is interpreted as the maximum size of a DNS message the
caller is willing to send. To comply with the DNS specification,
it should be at least 512 octets long for UDP transport. For TCP
transport, the maximum possible size (65,535 octets) should be
used.

A [`Response`] is returned, signifying whether a response is to
be sent and, if so, how long the response message written into
`response_buf` is.
Handles a received DNS message . This is the API through which I / O providers submit messages . ` received_buf ` contains the message received . ` response_buf ` is a buffer into which a response message may be serialized . Its length is interpreted as the maximum size of a DNS message the caller is willing to send . To comply with the DNS specification it should be at least 512 octets long for UDP transport . For TCP transport the maximum possible size ( 65 535 octets ) should be used . A [ ` Response ` ] is returned signifying whether a response is to be sent and if so how long the response message written into ` response_buf ` is .
pub fn handle_message(
        &self,
        received_buf: &[u8],
        response_buf: &mut [u8],
        over_tcp: bool,
    ) -> Response {
        if let Ok(received) = Reader::try_from(received_buf) {
            // We currently only support standard queries.
            if received.opcode() == Opcode::Query {
                self.handle_query(received, response_buf, over_tcp)
            } else {
                generate_error(&received, None, Rcode::NotImp, response_buf)
            }
        } else {
            // Ignore messages that do not contain a full DNS header.
            Response::None
        }
    }
pub fn handle_message ( & self , received_buf : & [ u8 ] , response_buf : & mut [ u8 ] , over_tcp : bool , ) -> Response { if let Ok ( received ) = Reader :: try_from ( received_buf ) { // We currently only support standard queries. if received . opcode ( ) == Opcode :: Query { self . handle_query ( received , response_buf , over_tcp ) } else { generate_error ( & received , None , Rcode :: NotImp , response_buf ) } } else { // Ignore messages that do not contain a full DNS header. Response :: None } }
Handles a received DNS message.
Handles a received DNS message .
&self
received_buf
&[u8]
response_buf
&mut [u8]
over_tcp
bool
&self
received_buf
&[u8]
response_buf
&mut [u8]
over_tcp
bool