def talk.cont

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

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-time@0.3.0.0/time.bend as Time
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

5994def talk.cont(cont: Bool, s: Socket, ms: U32) -> IO(Socket & Result<&1, &1, U32 & String, Unit>):
5995  match cont:
5996    case False{}:
5997      IO.pure(Socket & Result<&1, &1, U32 & String, Unit>, (s, Done{Unit{}}))
5998    case True{}:
5999      do IO<Socket & Result<&1, &1, U32 & String, Unit>>:
6000        now : Time.Duration <- Time.mono()
6001        bounded.send(s, Bytes.from_string("HTTP/1.1 100 Continue\r\n\r\n"), Time.Duration.add(now, Time.Duration.of_ms(ms)))

Uses (17)

Used by (1)