All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.apollographql.apollo.network.ws.WebSocket.kt Maven / Gradle / Ivy

There is a newer version: 2.5.14
Show newest version
package com.apollographql.apollo.network.ws

import kotlinx.coroutines.channels.ReceiveChannel
import okio.ByteString

interface WebSocketFactory {
  suspend fun open(headers: Map = emptyMap()): WebSocketConnection
}

interface WebSocketConnection : ReceiveChannel {

  fun send(data: ByteString)

  fun close()
}

expect class ApolloWebSocketFactory constructor(
    serverUrl: String,
    headers: Map = emptyMap()
) : WebSocketFactory




© 2015 - 2025 Weber Informatics LLC | Privacy Policy