# `HTTP.ClientCompletion`
[🔗](https://github.com/gsmlg-dev/http_fetch/blob/v1.0.0/apps/http_core/lib/http/client_completion.ex#L1)

Durable cleanup receipt returned by EventSource and WebSocket `completion/1`.

A finite wait confirms tracked request resources have terminated or been
handed off to their retained HTTP/2 owner. Healthy shared connections stay
open. Logical close, protocol acknowledgements and process death alone do not
establish cleanup. Receipts remain readable after the client exits; repeated
and concurrent waits are safe. Lost evidence is reported as unconfirmed.

This barrier does not certify native allocator or kernel memory reclamation,
or remote receipt of application bytes. WebSocket over HTTP/3 confirms the
CONNECT stream settled on its owner and, for an exclusive owner, native QUIC
cleanup (see `docs/http3-extensions-contract.md`). EventSource over HTTP/3
remains explicitly unsupported by this receipt.

# `result`

```elixir
@type result() ::
  :ok
  | {:error,
     :cleanup_pending | :cleanup_unconfirmed | {:unsupported_completion, atom()}}
```

# `t`

```elixir
@opaque t()
```

# `await`

```elixir
@spec await(t(), non_neg_integer()) :: result()
```

Waits for cleanup using one finite timeout in milliseconds.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
