# `Plushie.Test.PoolAdapter`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.7.2/lib/plushie/test/pool_adapter.ex#L1)

Iostream adapter that connects a Bridge to one SessionPool session.

Acts as a thin relay between the Bridge's iostream protocol and the
SessionPool's multiplexed port. The Bridge handles session_id injection
via its `:session_id` option, so this adapter only needs to forward raw
bytes in both directions.

The adapter registers a session with the pool and monitors the pool
for crashes. Incoming pool events are re-encoded and forwarded to the
Bridge as iostream data.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: {:ok, pid(), String.t()} | {:error, term()}
```

Starts a pool adapter and returns `{:ok, pid, session_id}`.

## Options

- `:pool` - the SessionPool server (required)
- `:format` - wire format, `:msgpack` (default) or `:json`

---

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