# `HTTP.ClientCompletion`
[🔗](https://github.com/gsmlg-dev/http_fetch/blob/v0.21.18/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. HTTP/3 retains its separate QUIC
cleanup contract and is 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*
