commonMain.com.ditchoom.websocket.WebSocket.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of socket-js Show documentation
Show all versions of socket-js Show documentation
Simple multiplatform kotlin coroutines based socket.
package com.ditchoom.websocket
import com.ditchoom.buffer.PlatformBuffer
import com.ditchoom.buffer.ReadBuffer
import com.ditchoom.socket.SocketController
import com.ditchoom.socket.SocketDataRead
import kotlin.time.ExperimentalTime
@ExperimentalTime
@ExperimentalUnsignedTypes
interface WebSocket : SocketController {
suspend fun read(): WebSocketDataRead
suspend fun write(buffer: PlatformBuffer)
suspend fun write(string: String)
suspend fun ping()
}