Struct trust_dns::server::Server [] [src]

pub struct Server {
    // some fields omitted
}

Methods

impl Server

fn new(catalog: Catalog) -> Server

fn register_socket(&mut self, socket: UdpSocket)

register a UDP socket. Should be bound before calling this.

fn register_listener(&mut self, listener: TcpListener)

register a TcpListener to the Server. This should already be bound to either an IPv6 or an IPv4 address.

fn listen(&mut self) -> Result<()>

TODO how to do threads? should we do a bunch of listener threads and then query threads? Ideally the processing would be n-threads for recieving, which hand off to m-threads for request handling. It would generally be the case that n <= m.

Trait Implementations

impl Handler for Server

type Timeout = Token

type Message = ()

fn ready(&mut self, event_loop: &mut EventLoop<Self>, token: Token, events: EventSet)

fn interrupted(&mut self, event_loop: &mut EventLoop<Self>)

fn notify(&mut self, event_loop: &mut EventLoop<Self>, msg: Self::Message)

fn timeout(&mut self, event_loop: &mut EventLoop<Self>, timeout: Self::Timeout)

fn tick(&mut self, event_loop: &mut EventLoop<Self>)