# `HTTP.WebSocket.ArrayBuffer`
[🔗](https://github.com/gsmlg-dev/http_fetch/blob/v0.21.17/apps/http_web_socket/lib/http/web_socket/array_buffer.ex#L1)

Explicit binary frame payload wrapper for `HTTP.WebSocket.send/2`.

Plain Elixir binaries are also strings, so `HTTP.WebSocket.send/2` treats a
bare binary as text. Wrap binary data with this struct when the WebSocket
frame opcode must be binary.

# `t`

```elixir
@type t() :: %HTTP.WebSocket.ArrayBuffer{
  byte_length: non_neg_integer(),
  data: binary()
}
```

# `new`

```elixir
@spec new(binary()) :: t()
```

Creates a new array buffer wrapper.

---

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