A reliable, self-reconnecting GuavaSocket connection.
Wraps a WebSocket connection and drives the pure reliable-protocol
state machine (Guava.Socket.Reliable). It performs the open/open-ack
handshake, retransmits unacked messages across reconnects, keeps the
connection alive with pings, and reconnects with backoff — mirroring the
Python GuavaSocket.
Messages delivered to the owner
{:guava_socket, pid, :ready}— handshake complete, socket open{:guava_socket, pid, {:payload, map}}— an inbound payload arrived{:guava_socket, pid, {:closed, reason, description}}— permanently closed
Summary
Functions
Returns a specification to start this module under a supervisor.
Close the socket permanently.
Enqueue a payload map to send to the peer (buffered until deliverable).
Start a socket.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Close the socket permanently.
Enqueue a payload map to send to the peer (buffered until deliverable).
@spec start_link(keyword()) :: GenServer.on_start()
Start a socket.
Options
:name— a label for logging (string):url— thews(s)://URL to connect to:headers— auth/identification headers (list of{k, v}):owner— pid to deliver events to (defaults to the caller):max_age_ms— optionally close the socket after this many ms