# `Fwup.Stream`

Process wrapper around the `fwup` port.
Should be used with `--framing`

# `options`

```elixir
@type options() :: [name: atom(), cm: pid(), fwup_args: [String.t()]]
```

GenServer options

* `:name` - the name of the GenServer
* `:cm` - where to send fwup messages
* `:fwup_args` - arguments to pass to fwup
* `:fwup_env` - a list of tuples to pass in the OS environment to fwup

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `send_chunk`

```elixir
@spec send_chunk(GenServer.server(), iodata(), timeout()) :: :ok
```

Send a chunk of data to FWUP

This passes the data to FWUP for processing. Depending on how much data needs
to be written, this may take seconds to return. Delta firmware updates, for
example, compress extremely well and need to write a lot of data before
they're finished processing.

# `start_link`

```elixir
@spec start_link(options()) :: GenServer.on_start()
```

Start a FWUP stream

## Warning
By default will create a `global` named process. This means that ideally
you can not open two streams at once.

# `start_link`

> This function is deprecated. Use Fwup.Stream.start_link/1 instead.

---

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