Behaviour for the WebSocket transport under a Lightstreamer.Session.
A transport delivers inbound traffic to the process that called connect/2
as plain messages:
{:transport, t, {:text, binary}}— a chunk of inbound text; chunks may be fragmented or coalesced relative to server lines, so the session splits on CR-LF and buffers partial trailing lines{:transport, t, :closed}— the connection is gone
The production implementation is Lightstreamer.Transport.MintWs; tests
drive a Lightstreamer.Session through a scripted stub instead. Swap via
the :transport option on Lightstreamer.connect/2 — never app config.
Summary
Callbacks
Closes the transport. Never sends :closed back to the owner.
Synchronously opens the transport to url and completes any handshake.
Sends one WebSocket text message.
Types
@type t() :: term()
Opaque transport handle, defined by each implementation.
Callbacks
@callback close(t()) :: :ok
Closes the transport. Never sends :closed back to the owner.
Synchronously opens the transport to url and completes any handshake.
The calling process becomes the owner and receives the inbound messages described in the moduledoc.
Sends one WebSocket text message.