def reply_fail

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

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-http@0.38.2.0/completion.bend as Completion
import bend-kit-time@0.3.0.0/time.bend as Time

5641def reply_fail(observer: Completion.Receipt, s: Socket, +status: U32, ms: U32) -> IO(Unit):
5642  do IO<Unit>:
5643    now : Time.Duration <- Time.mono()
5644    sent : Socket & Result<&1, &1, U32 & String, Unit> <-
5645      bounded.send(s, encode(reply.fail.bytes(status)), Time.Duration.add(now, Time.Duration.of_ms(ms)))
5646    reply.sent.observe(observer, status, sent)

Uses (17)

Used by (3)