def stream.give

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

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

4860def stream.give(whole: Bool, back: Maybe<&2, String>, p: Pool, +tls: Bool, s: Socket) -> IO(Pool):
4861  match whole:
4862    case True{}:
4863      match back:
4864        case Some{+key}:
4865          pool.give(p, key, Conn{tls, s})
4866        case None{}:
4867          do IO<Pool>:
4868            io.close(tls, s)
4869            return p
4870    case False{}:
4871      do IO<Pool>:
4872        io.close(tls, s)
4873        return p

Uses (12)

Used by (1)