Struct trust_dns_server::ServerFuture
[−]
[src]
pub struct ServerFuture<T: RequestHandler + Send + 'static> { /* fields omitted */ }
A Futures based implementation of a DNS server
Methods
impl<T: RequestHandler + Send> ServerFuture<T>
[src]
pub fn new(handler: T) -> ServerFuture<T>
[src]
Creates a new ServerFuture with the specified Handler.
pub fn register_socket(&self, socket: UdpSocket)
[src]
Register a UDP socket. Should be bound before calling this function.
pub fn register_socket_std(&self, socket: UdpSocket)
[src]
Register a UDP socket. Should be bound before calling this function.
pub fn register_listener(
&self,
listener: TcpListener,
timeout: Duration
) -> Result<()>
[src]
&self,
listener: TcpListener,
timeout: Duration
) -> Result<()>
Register a TcpListener to the Server. This should already be bound to either an IPv6 or an IPv4 address.
To make the server more resilient to DOS issues, there is a timeout. Care should be taken to not make this too low depending on use cases.
Arguments
listener
- a bound TCP sockettimeout
- timeout duration of incoming requests, any connection that does not send requests within this time period will be closed. In the future it should be possible to create long-lived queries, but these should be from trusted sources only, this would require some type of whitelisting.
pub fn register_listener_std(
&self,
listener: TcpListener,
timeout: Duration
) -> Result<()>
[src]
&self,
listener: TcpListener,
timeout: Duration
) -> Result<()>
Register a TcpListener to the Server. This should already be bound to either an IPv6 or an IPv4 address.
To make the server more resilient to DOS issues, there is a timeout. Care should be taken to not make this too low depending on use cases.
Arguments
listener
- a bound TCP sockettimeout
- timeout duration of incoming requests, any connection that does not send requests within this time period will be closed. In the future it should be possible to create long-lived queries, but these should be from trusted sources only, this would require some type of whitelisting.
pub fn register_tls_listener(
&self,
listener: TcpListener,
timeout: Duration,
pkcs12: ParsedPkcs12
) -> Result<()>
[src]
&self,
listener: TcpListener,
timeout: Duration,
pkcs12: ParsedPkcs12
) -> Result<()>
Register a TlsListener to the Server. The TlsListener should already be bound to either an IPv6 or an IPv4 address.
To make the server more resilient to DOS issues, there is a timeout. Care should be taken to not make this too low depending on use cases.
Arguments
listener
- a bound TCP (needs to be on a different port from standard TCP connections) sockettimeout
- timeout duration of incoming requests, any connection that does not send requests within this time period will be closed. In the future it should be possible to create long-lived queries, but these should be from trusted sources only, this would require some type of whitelisting.pkcs12
- certificate used to announce to clients
pub fn register_tls_listener_std(
&self,
listener: TcpListener,
timeout: Duration,
pkcs12: ParsedPkcs12
) -> Result<()>
[src]
&self,
listener: TcpListener,
timeout: Duration,
pkcs12: ParsedPkcs12
) -> Result<()>
Register a TlsListener to the Server. The TlsListener should already be bound to either an IPv6 or an IPv4 address.
To make the server more resilient to DOS issues, there is a timeout. Care should be taken to not make this too low depending on use cases.
Arguments
listener
- a bound TCP (needs to be on a different port from standard TCP connections) sockettimeout
- timeout duration of incoming requests, any connection that does not send requests within this time period will be closed. In the future it should be possible to create long-lived queries, but these should be from trusted sources only, this would require some type of whitelisting.pkcs12
- certificate used to announce to clients