package dns-client
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8f3ec95acf14f574219b5440a689eae1acc2a49cb1d8a066f9b23a7ac68f44f0
sha512=7bf2d099919a410f270d157a04a8d2e1c499269cca868e19a80396cdfc84a9b844c353267cf9183f585bb9b975445b8e2d0a6dd64d85b8de19e7752ec495cbe9
doc/dns-client.unix/Dns_client_unix/Transport/index.html
Module Dns_client_unix.Transport
Source
A flow module based on blocking I/O on top of the Unix socket API.
TODO: Implement the connect timeout.
io
is the type of an effect. 'err
is a polymorphic variant.
An address for a given context type, usually this will consist of IP address + a TCP/IP or UDP/IP port number, but for some context types it can carry additional information for purposes of cryptographic verification.
A stack with which to connect.
The abstract state of a DNS client.
create ~nameservers ~timeout stack
creates the state record of the DNS client. We use timeout
(ns) as a cumulative time budget for connect and request timeouts.
The address of a nameservers that is supposed to work with the underlying context, can be used if the user does not want to bother with configuring their own.
rng t
is a random number generator.
clock t
is the monotonic clock.
connect t
is a new connection (context
) to t
, or an error.
send_recv context buffer
sends buffer
to the context
upstream, and then reads a buffer.