WebSocketConnection

Deprecated

The websocket implementation has moved to 'com.apollographql.apollo.network.websocket'. See https://go.apollo.dev/ak-v5-websockets for more details.

Functions

Link copied to clipboard
abstract fun close()

closes the websocket gracefully and asynchronously

Link copied to clipboard
abstract suspend fun receive(): String

Suspends until a message is available and return it. If the message was binary, it is converted to a String

Link copied to clipboard
abstract fun send(string: String)

Sends a text message asynchronously.

abstract fun send(data: ByteString)

Sends a binary message asynchronously.