package mnet-dns

  1. Overview
  2. Docs

Module Mnet_dns.TransportSource

Sourcetype context = {
  1. nameservers : io_addr list;
  2. timeout : int;
  3. mutable ports : Set.t;
  4. mutable mode : [ `Tcp of Ipaddr.t * Ke.t | `Udp ] option;
  5. mutable reqs : (string * ivar) Reqs.t;
  6. mutable ureqs : ivar UReqs.t;
  7. queries : string Queue.t;
  8. uqueries : int Queue.t;
  9. mutex : Miou.Mutex.t;
  10. condition : Miou.Condition.t;
  11. he : Mnet_happy_eyeballs.t;
  12. udp : Mnet.UDP.state;
}
Sourceand ivar = string Miou.Computation.t
Sourceand t = context * unit Miou.t
Sourceand +'a io = 'a
Sourceand io_addr = [
  1. | `Plaintext of Ipaddr.t * int
  2. | `Tls of Tls.Config.client * Ipaddr.t * int
]
Sourceval kill : ('a * 'b Miou.t) -> unit
Sourceval bind : 'a -> ('a -> 'b) -> 'b
Sourceval lift : 'a -> 'a
Sourceval clock : unit -> int64
Sourceval rng : int -> string
Sourceval nsec_per_day : int64
Sourceval ps_per_ns : int64
Sourceval time : unit -> Ptime.t option
Sourceval uncensoreddns_org : [> `Tls of Tls.Config.client * Ipaddr.t * int ]
Sourceval nameservers : (context * 'a) -> [> `Tcp | `Udp ] * io_addr list
Sourceexception Timeout
Sourceval with_timeout : timeout:int -> (unit -> [> `Timeout ] as 'a) -> 'a
Sourceval generate_port : context -> (int, [> `Msg of string ]) result
Sourceval to_pairs : [ `Plaintext of Ipaddr.t * int | `Tls of Tls.Config.client * Ipaddr.t * int ] list -> (Ipaddr.t * int) list
Sourceval tls_config_of_nameserver : [> `Tls of 'a * Ipaddr.t * 'b ] list -> (Ipaddr.t * 'b) -> 'a option
Sourceval connect_to_nameservers : context -> [ `Plaintext of Ipaddr.t * int | `Tls of Tls.Config.client * Ipaddr.t * int ] list -> ((Ipaddr.t * int) * [> `Plain of Mnet.TCP.flow | `TLS of Mnet_tls.t ], [> `Msg of string ]) result
Sourceval try_tls_connection : context -> [ `Plaintext of Ipaddr.t * int | `Tls of Tls.Config.client * Ipaddr.t * int ] list -> Tls.Config.client -> (Ipaddr.t * int) -> Mnet.TCP.flow -> ((Ipaddr.t * int) * [> `Plain of Mnet.TCP.flow | `TLS of Mnet_tls.t ], [> `Msg of string ]) result
Sourceval process : Ke.t -> ('a * string Miou.Computation.t) Reqs.t -> unit
Sourceval read_from_tcp : context -> Ke.t -> bytes -> Mnet.TCP.flow -> unit
Sourceval read_from_tls : context -> Ke.t -> bytes -> Mnet_tls.t -> unit
Sourceval write_to_connection : context -> [< `Plain of Mnet.TCP.flow | `TLS of Mnet_tls.t ] -> 'a
Sourceval _backoff_max : int
Sourceval read_from_connection : context -> Ke.t -> [> `Connect_failed | `Connected ]
Sourceval connection_loop : context -> Ke.t -> 'a
Sourceval read_from_udp : context -> 'a
Sourceval daemon : context -> unit
Sourceval create : ?nameservers:??? -> timeout:int64 -> (Mnet.UDP.state * Mnet_happy_eyeballs.t) -> context * unit Miou.t
Sourceval connect : (context * 'a) -> ([> `Tcp | `Udp ] * context, [> `Msg of string ]) result
Sourceval close : 'a -> unit
Sourceval push_on_tcp : context -> string -> unit
Sourceval push_on_udp : context -> int -> unit
Sourceval send_recv : context -> string -> (string, [> `Msg of string ]) result