# `PhoenixWebTransport.Quic.Listener`
[🔗](https://github.com/knevan/phoenix-wtransport/blob/main/lib/phoenix_wtransport/quic/listener.ex#L1)

WebTransport listener on `erlang_quic` (benoitc/erlang_quic), a pure Erlang
QUIC + HTTP/3 stack with zero native build dependencies.

erlang_quic ships the primitives WebTransport needs (extended CONNECT,
HTTP datagrams, claiming the WebTransport stream types, RFC 9218 stream
priority in its send path) and leaves the session protocol to a library.
This module starts the HTTP/3 server and spawns a
`PhoenixWebTransport.Quic.Session` per connection (either under
`session_supervisor` when run via `PhoenixWebTransport.Supervisor` or directly).

Options: `:endpoint`, `:socket` / `:sockets` / `:routes` (or auto-discovered
via `Endpoint.__sockets__/0`), `:path` (default `"/live"`), `:port` (default
4433, `0` for an ephemeral port), `:cert_dir` or `:certfile`/`:keyfile`,
`:check_origin`, `:connect_info`, `:auth_token`, `:max_lanes` (default 16),
`:max_frame_size`, `:max_in_buf_bytes`, `:max_client_streams`,
`:socket_backend` (`:gen_udp` default, or `:socket` for OTP `socket` NIF with
Linux GRO/GSO), `:quic_opts`, `:url`, `:enabled` (`false` skips the
listener), `:register` (default `true`), `:name`, `:server_name`,
`:session_supervisor`, `:registry`.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `port`

```elixir
@spec port(GenServer.server()) :: :inet.port_number()
```

Returns the UDP port bound by the listener.

---

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