OffBroadwayWebSocket.Producer (off_broadway_websocket v0.0.1)
A GenStage producer that manages WebSocket connections using the gun library.
This module establishes a WebSocket connection, handles reconnections upon disconnection, and manages message dispatching based on demand. It monitors the WebSocket connection with ping/pong messages and schedules reconnection attempts in case of timeout or disconnection.
Summary
Functions
Closes the connection and schedules a reconnect on WebSocket timeout.
Functions
Link to this function
dispatch_events(state, incoming_demand)
@spec dispatch_events(OffBroadwayWebSocket.State.t(), non_neg_integer()) :: {atom(), list(), OffBroadwayWebSocket.State.t()}
Link to this function
on_ws_timeout(state)
Closes the connection and schedules a reconnect on WebSocket timeout.
Link to this function