Glock.Stream (Glock v0.1.1) View Source
Implements a Glock websocket connection as an Elixir Stream resource, returning messages as they are received until the connection is terminated, either by the remote websocket server or by exiting the Glock process.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Synchronously send a message to the remote server via the glock process.
Asynchronously send a message to the remote server via the glock process.
Start a named glock process outside of a supervision tree, passing all http and websocket configuration options for initialization.
Start a named glock process and link it to the calling process, passing all http and websocket configuration options for initialization.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Specs
push(GenServer.server(), term()) :: :ok | :close
Synchronously send a message to the remote server via the glock process.
Specs
push_async(GenServer.server(), term()) :: :ok
Asynchronously send a message to the remote server via the glock process.
Specs
start(Glock.init_opts()) :: GenServer.on_start()
Start a named glock process outside of a supervision tree, passing all http and websocket configuration options for initialization.
Specs
start_link(Glock.init_opts()) :: GenServer.on_start()
Start a named glock process and link it to the calling process, passing all http and websocket configuration options for initialization.
Specs
stream(Glock.init_opts()) :: Enumerable.t()