Strata is pre-1.0. APIs, protocol, and storage format may change.
strata_transport_gun
strata_transport_gun targets Erlang. It uses gluegun to connect to a
WebSocket server and receive text frames.
Public API
Section titled “Public API”options() -> Optionsuses a five-second timeout and plain TCP.with_timeout(options, timeout) -> Optionschanges the connect timeout.with_secure(options, secure) -> Optionsselects TLS or plain TCP.connection_path(path, token) -> Stringbuilds the WebSocket path and percent-encodes thetokenquery value once.open_socket(...) -> Result(Socket, GluegunError)connects with that encoded path and starts a receive process.send_text(socket, text) -> Result(Nil, GluegunError)sends one text frame.close(socket) -> Result(Nil, GluegunError)closes the WebSocket.
CloseEvent is Closed or Failed(GluegunError).
See Erlang and Gun Transport for a connection example.
Source:
packages/strata_transport_gun.