glock v0.1.0 Glock.Conn View Source
Defines the glock connection struct that serves as the configuration state of an initialized glock process.
The struct tracks all configuration settings and arguments passed into the connection when it is initialized and provides common default values for all settings except for the host and path of the remote websocket server.
Provides utility functions for creating and ensuring the proper default values are set within the connection struct.
Link to this section Summary
Functions
Reduces over a keyword list of arguments for configuring the
glock process and adds them to an empty instance of the Glock.Conn.t
struct. Configs are merged with values passed by the user superseding
default values with the exception of the http protocol which is locked
to HTTP/1.1 for websocket compatibility.
Link to this section Types
t()
View Sourcet() :: %Glock.Conn{ client: pid(), connect_opts: %{ connect_timeout: non_neg_integer(), retry: non_neg_integer(), retry_timeout: non_neg_integer(), transport: :tcp | :tls }, handler_init_args: term(), headers: [binary()], host: charlist(), monitor: reference(), path: charlist(), port: non_neg_integer(), stream: reference(), stream_state: term(), ws_opts: %{ compress: boolean(), closing_timeout: non_neg_integer(), keepalive: non_neg_integer() } }
Link to this section Functions
Reduces over a keyword list of arguments for configuring the
glock process and adds them to an empty instance of the Glock.Conn.t
struct. Configs are merged with values passed by the user superseding
default values with the exception of the http protocol which is locked
to HTTP/1.1 for websocket compatibility.