View Source Zenohex.PullSubscriber (Zenohex v0.2.0)
Documentation for Elixir.Zenohex.PullSubscriber
.
Summary
Types
@type t() :: reference()
Functions
Pull data.
Examples
iex> {:ok, session} = Zenohex.open()
iex> {:ok, pull_subscriber} = Zenohex.Session.declare_pull_subscriber(session, "key/expression")
iex> Zenohex.PullSubscriber.pull(pull_subscriber)
:ok
@spec recv_timeout(t(), pos_integer()) :: {:ok, Zenohex.Sample.t()} | {:error, :timeout} | {:error, reason :: any()}
Receive data. Normally users don't need to change the default timeout_us.
Examples
iex> {:ok, session} = Zenohex.open()
iex> {:ok, pull_subscriber} = Zenohex.Session.declare_pull_subscriber(session, "key/expression")
iex> Zenohex.PullSubscriber.recv_timeout(pull_subscriber)
{:error, :timeout}