# `Membrane.WebRTC.WhipServer`
[🔗](https://github.com/membraneframework/membrane_webrtc_plugin/blob/v0.26.7/lib/membrane_webrtc/whip_server.ex#L1)

Server accepting WHIP connections.

Accepts the following options:

- `handle_new_client` - function that accepts the client token and returns either
  the signaling channel to negotiate the connection or error to reject it. The signaling
  channel can be passed to `Membrane.WebRTC.Source`.
- `serve_static` - path to static assets that should be served along with WHIP,
  under a `/static` endpoint. Useful to serve HTML assets. If set to `false` (default),
  no static assets are served
- Any of `t:Bandit.options/0` - Bandit configuration

# `option`

```elixir
@type option() ::
  {:handle_new_client,
   (token :: String.t() -&gt;
      {:ok, Membrane.WebRTC.Signaling.t()} | {:error, reason :: term()})}
  | {:serve_static, String.t() | false}
  | {atom(), term()}
```

# `child_spec`

```elixir
@spec child_spec([option()]) :: Supervisor.child_spec()
```

# `start_link`

```elixir
@spec start_link([option()]) :: Supervisor.on_start()
```

---

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