Trait dnscache::Network [] [src]

pub trait Network {
    type ClientId: Copy;
    fn send_to_client(
        &self,
        buf: &[u8],
        client: Self::ClientId
    ) -> BoxResult<()>;
fn send_to_upstream(&self, buf: &[u8]) -> BoxResult<()>;
fn recv_from(
        &self,
        buf: &mut [u8]
    ) -> BoxResult<(usize, ReceiveResult<Self::ClientId>)>; }

Network abstraction

Associated Types

What to use instead of SocketAddr

Required Methods

Like UdpSocket::send_to to upstream

Like UdpSocket::send_to

Like UdpSocket::recv_from

Implementors