# `ExCEP.Transport.FrameChannel`

Shared frame encoding/sending helpers for both Gateway clients and Cluster sessions.

# `recv_frame`

```elixir
@spec recv_frame(ExCEP.Transport.Socket.t(), binary(), keyword()) ::
  {:ok, ExCEP.Codec.Frame.t(), binary()} | {:error, term()}
```

Synchronously receives one complete `%Frame{}` from a passive (`active: false`) socket.
Used during the 3-way authentication handshake before switching to `{:active, :once}`.

# `send_auth`

```elixir
@spec send_auth(
  ExCEP.Transport.Socket.t(),
  String.t(),
  ExCEP.Codec.AuthAsdu.t(),
  keyword()
) ::
  :ok | {:error, term()}
```

Encodes and sends an authentication binary ASDU frame (`auth?: true`).

# `send_data`

```elixir
@spec send_data(
  ExCEP.Transport.Socket.t(),
  String.t(),
  ExCEP.Codec.DataAsdu.t(),
  keyword()
) ::
  :ok | {:error, term()}
```

Encodes and sends a JSON `%DataAsdu{}` frame with automatic compression & signing policy.

---

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