View Source Zenohex.Subscriber (Zenohex v0.2.0)

Documentation for Elixir.Zenohex.Subscriber.

Summary

Functions

Receive data. Normally users don't need to change the default timeout_us.

Types

@opaque t()

Functions

Link to this function

recv_timeout(subscriber, timeout_us \\ 1000)

View Source
@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, subscriber} = Zenohex.Session.declare_subscriber(session, "key/expression")
iex> Zenohex.Subscriber.recv_timeout(subscriber)
{:error, :timeout}