def stream.give

bend-kit-http@0.38.5.0 · http.bend:4864

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

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

Uses (12)

Used by (1)