# `Anubis.Transport.Behaviour`

Defines the behavior that all transport implementations must follow.

# `message`

```elixir
@type message() :: String.t()
```

The JSON-RPC message encoded

# `reason`

```elixir
@type reason() :: term() | Anubis.MCP.Error.t()
```

# `t`

```elixir
@type t() :: GenServer.server()
```

# `send_message`

```elixir
@callback send_message(t(), message(), [opt]) :: :ok | {:error, reason()}
when opt: {:timeout, pos_integer()}
```

# `shutdown`

```elixir
@callback shutdown(t()) :: :ok | {:error, reason()}
```

# `start_link`

```elixir
@callback start_link(keyword()) :: GenServer.on_start()
```

# `supported_protocol_versions`

```elixir
@callback supported_protocol_versions() :: [String.t()] | :all
```

Returns the list of MCP protocol versions supported by this transport.

## Examples

    iex> MyTransport.supported_protocol_versions()
    ["2024-11-05", "2025-03-26"]

---

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