def conn.dial.time

bend-kit-http@0.38.2.0 · http.bend:2894

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-wire@0.4.7.0/wire.bend as Wire

2894def conn.dial.time(+ip: String, +port: U32, +deadline: Nat, now: Nat, expired: Bool) ->
2895  IO(Result<&1, &1, U32 & String, Socket>):
2896  match expired:
2897    case True{}:
2898      IO.pure(Result<&1, &1, U32 & String, Socket>, Fail{(60, "connect timeout")})
2899    case False{}:
2900      Wire.connect(ip, port, U32.from_nat(Nat.sub(deadline, now)))

Uses (13)

Used by (1)