glock v0.1.0 Glock.Stream 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
.
push(conn, message)
View Sourcepush(GenServer.server(), term()) :: :ok | :close
Synchronously send a message to the remote server via the glock process.
push_async(conn, message)
View Sourcepush_async(GenServer.server(), term()) :: :ok
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_link(init_opts)
View Sourcestart_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.