# `MAVLink2.Transport.Loopback`
[🔗](https://github.com/isaiahdw/mavlink2/blob/v0.1.0/lib/mavlink2/transport/loopback.ex#L1)

An in-memory transport for tests. With `echo: true` everything written
comes back to the owner; with `peer:` a pid or registered name (another
link), everything written goes to it, or nowhere while it is not running.
`inject/2` delivers bytes as though the peer had sent them, and
`written/1` returns what was written.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `inject`

```elixir
@spec inject(pid(), binary()) :: :ok
```

Deliver `bytes` to the owner as though the peer had sent them.

# `written`

```elixir
@spec written(pid()) :: binary()
```

Everything written so far, oldest first.

---

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