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.