WsProtocol
Deprecated
The websocket implementation has moved to 'com.apollographql.apollo.network.websocket'. See https://go.apollo.dev/ak-v5-websockets for more details.
A WsProtocol is responsible for handling the details of the WebSocket protocol.
Implementations must implement WsProtocol.handleServerMessage, WsProtocol.startOperation, WsProtocol.stopOperation
WsProtocol.handleServerMessage, WsProtocol.startOperation, WsProtocol.stopOperation all share the same thread and rely on webSocketConnection to do the operations async
Parameters
the connection
a listener
Inheritors
Types
Functions
Closes the connection gracefully. It is expected that a future call to WsProtocol.Listener.networkError is made
Initializes the connection and suspends until the server acknowledges it.
Handles a server message and notifies listener appropriately
Starts the given operation
Stops the given operation