-
public interface StreamWebSocketFactoryFactory interface for creating StreamWebSocket instances.
Implementations define how WebSocket connections are established and configured within the Stream SDK. This allows both SDK internals and consumers to plug in custom WebSocket creation logic while preserving a unified contract.
The created socket will be configured with the given StreamSocketConfig, and bound to the provided WebSocketListener for low-level socket events.
-
-
Method Summary
Modifier and Type Method Description abstract Result<WebSocket>create(StreamSocketConfig streamSocketConfig, WebSocketListener listener)Creates a new WebSocket instance. -
-
Method Detail
-
create
abstract Result<WebSocket> create(StreamSocketConfig streamSocketConfig, WebSocketListener listener)
Creates a new WebSocket instance.
- Parameters:
streamSocketConfig- Configuration for the WebSocket connection, including endpoint URL, headers, and connection parameters.listener- An OkHttp WebSocketListener to receive raw WebSocket lifecycle events such as open, message, closing, and failure.
-
-
-
-