Struct trust_dns::client::ClientFuture
[−]
[src]
#[must_use = "futures do nothing unless polled"]pub struct ClientFuture<S: Stream<Item = Vec<u8>, Error = Error>> { /* fields omitted */ }
A DNS Client implemented over futures-rs.
This Client is generic and capable of wrapping UDP, TCP, and other underlying DNS protocol implementations.
Methods
impl<S: Stream<Item = Vec<u8>, Error = Error> + 'static> ClientFuture<S>
[src]
fn new(
stream: Box<Future<Item = S, Error = Error>>,
stream_handle: Box<ClientStreamHandle<Error = ClientError>>,
loop_handle: &Handle,
signer: Option<Arc<Signer>>
) -> BasicClientHandle
[src]
stream: Box<Future<Item = S, Error = Error>>,
stream_handle: Box<ClientStreamHandle<Error = ClientError>>,
loop_handle: &Handle,
signer: Option<Arc<Signer>>
) -> BasicClientHandle
Spawns a new ClientFuture Stream. This uses a default timeout of 5 seconds for all requests.
Arguments
stream
- A stream of bytes that can be used to send/receive DNS messages (see TcpClientStream or UdpClientStream)loop_handle
- A Handle to the Tokio reactor Core, this is the Core on which the the Stream will be spawnedstream_handle
- The handle for thestream
on which bytes can be sent/received.signer
- An optional signer for requests, needed for Updates with Sig0, otherwise not needed
fn with_timeout(
stream: Box<Future<Item = S, Error = Error>>,
stream_handle: Box<DnsStreamHandle<Error = ClientError>>,
loop_handle: &Handle,
timeout_duration: Duration,
finalizer: Option<Arc<Signer>>
) -> BasicClientHandle
[src]
stream: Box<Future<Item = S, Error = Error>>,
stream_handle: Box<DnsStreamHandle<Error = ClientError>>,
loop_handle: &Handle,
timeout_duration: Duration,
finalizer: Option<Arc<Signer>>
) -> BasicClientHandle
Spawns a new ClientFuture Stream.
Arguments
stream
- A stream of bytes that can be used to send/receive DNS messages (see TcpClientStream or UdpClientStream)loop_handle
- A Handle to the Tokio reactor Core, this is the Core on which the the Stream will be spawnedtimeout_duration
- All requests may fail due to lack of response, this is the time to wait for a response before canceling the request.stream_handle
- The handle for thestream
on which bytes can be sent/received.finalizer
- An optional signer for requests, needed for Updates with Sig0, otherwise not needed