package mnet-happy-eyeballs
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Connecting to a remote host via IP version 4 or 6 using mnet
Install
dune-project
Dependency
Authors
Maintainers
Sources
mnet-0.0.5.tbz
sha256=ebc621ad01b33a7f96fd049e71bbd06ef95c1a6b36d4072fd15fd35c1a93dc17
sha512=8d47f9434bc6472703f55f819bea21a7deb12095d925f0f8fbb8b96b799473b62a8b302966f579792354aa256b9109dcc16851f5cf951002d35a7d70bca59135
doc/src/mnet-happy-eyeballs.cli/mnet_happy_eyeballs_cli.ml.html
Source file mnet_happy_eyeballs_cli.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95let error_msgf fmt = Fmt.kstr (fun msg -> Error (`Msg msg)) fmt open Cmdliner let s_happy_eyeballs = "HAPPY EYEBALLS" let timeout = let is_digit = function '0' .. '9' -> true | _ -> false in let parser str = let len = let len = ref 0 in while !len < String.length str && is_digit str.[!len] do incr len done; !len in let meter = String.sub str len (String.length str - len) in let value = String.sub str 0 len in match meter with | "ns" -> Ok (Int64.of_string value) | "us" -> Ok (Duration.of_us (int_of_string value)) | "ms" -> Ok (Duration.of_ms (int_of_string value)) | "sec" | "s" -> Ok (Duration.of_sec (int_of_string value)) | "min" | "m" -> Ok (Duration.of_min (int_of_string value)) | "hour" | "h" -> Ok (Duration.of_hour (int_of_string value)) | _ -> error_msgf "Invalid time: %S" str in let parser str = try parser str with _exn -> error_msgf "Invalid time: %S" str in Arg.conv ~docv:"TIME" (parser, Duration.pp) let aaaa_timeout = let doc = "The timeout applied to the IPv6 resolution." in let open Arg in value & opt timeout (Duration.of_ms 50) & info [ "aaaa-timeout" ] ~doc ~docv:"TIME" ~docs:s_happy_eyeballs let connect_delay = let doc = "Time to repeat another connection attempt if the others don't respond." in let open Arg in value & opt timeout (Duration.of_ms 50) & info [ "connect-delay" ] ~doc ~docv:"TIME" ~docs:s_happy_eyeballs let connect_timeout = let doc = "The timeout applied top $(b,connect())." in let open Arg in value & opt timeout (Duration.of_sec 10) & info [ "connect-timeout" ] ~doc ~docv:"TIME" ~docs:s_happy_eyeballs let resolve_timeout = let doc = "The timeout applied to the domain-name resolution." in let open Arg in value & opt timeout (Duration.of_sec 1) & info [ "resolve-timeout" ] ~doc ~docv:"TIME" ~docs:s_happy_eyeballs let resolve_retries = let doc = "The number $(i,N) of attempts to make a connection." in let open Arg in value & opt int 3 & info [ "resolve-retries" ] ~doc ~docv:"NUMBER" ~docs:s_happy_eyeballs type setup = { aaaa_timeout: int64 ; connect_delay: int64 ; connect_timeout: int64 ; resolve_timeout: int64 ; resolve_retries: int } let setup aaaa_timeout connect_delay connect_timeout resolve_timeout resolve_retries = { aaaa_timeout ; connect_delay ; connect_timeout ; resolve_timeout ; resolve_retries } let setup = let open Term in const setup $ aaaa_timeout $ connect_delay $ connect_timeout $ resolve_timeout $ resolve_retries
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>