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

pub struct Server {
    // some fields omitted
}

Methods

impl Server
[src]

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
[src]

type Timeout = Token

type Message = ()

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

Invoked when the socket represented by token is ready to be operated on. events indicates the specific operations that are ready to be performed. Read more

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

Invoked when EventLoop has been interrupted by a signal interrupt.

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

Invoked when a message has been received via the event loop's channel.

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

Invoked when a timeout has completed.

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

Invoked at the end of an event loop tick.