# `ReverseIt.WebSocketProxy`
[🔗](https://github.com/chrismccord/reverse_it/blob/main/lib/reverse_it/websocket_proxy.ex#L1)

WebSocket proxy handler implementing the WebSock behavior.
Maintains bidirectional connection between client and backend.

# `t`

```elixir
@type t() :: %ReverseIt.WebSocketProxy{
  backend_upgrade_timer: reference() | nil,
  client: map(),
  config: ReverseIt.Config.t(),
  conn: Mint.HTTP.t(),
  initial_backend_data: binary(),
  pending_bytes: non_neg_integer(),
  pending_frames: [Mint.WebSocket.frame()],
  request_ref: Mint.Types.request_ref(),
  websocket: Mint.WebSocket.t()
}
```

# `handle_control`

Handles control frames from the client.

# `handle_in`

Handles incoming frames from the client and forwards them to the backend.

# `handle_info`

Handles messages from the backend connection.

# `init`

Initializes the WebSocket proxy connection.

The state contains:
- config: Backend configuration
- client_headers: Original client headers for forwarding

# `terminate`

Cleanup when connection terminates.

---

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