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

commonMain.com.ditchoom.socket.SocketController.kt Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
@file:Suppress("EXPERIMENTAL_API_USAGE")

package com.ditchoom.socket

import com.ditchoom.buffer.PlatformBuffer
import com.ditchoom.buffer.ReadBuffer
import com.ditchoom.buffer.SuspendCloseable
import com.ditchoom.data.Reader
import com.ditchoom.data.Writer
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
import kotlin.time.ExperimentalTime

@ExperimentalTime
interface SocketController : Reader, Writer, SuspendCloseable {
    override fun isOpen(): Boolean

    /**
     * Suspends the caller until the socket connection has fully closed.
     */
    suspend fun awaitClose()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy