Struct dnstap::DNSTapWriter [] [src]

pub struct DNSTapWriter { /* fields omitted */ }

DNSTapWriter is responsible for receiving DNS messages, connecting (and automatically reconnecting) to a UNIX socket, and asynchronously pushing the serialized data using frame stream protocol.

Example

use dnstap::DNSTapBuilder;

let dnstap_pending_writer = DNSTapBuilder::default()
    .backlog(4096)
    .unix_socket_path("/tmp/dnstap.sock")
    .listen().unwrap();

let dnstap_writer = dnstap_pending_writer.start().unwrap();

dnstap_writer.join().unwrap();

Methods

impl DNSTapWriter
[src]

Spawns a new task handling writes to the socket.

Returns a cloneable Sender object that can used to send DNS messages.