![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.com.ditchoom.socket.ServerSocket.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of socket-jvm Show documentation
Show all versions of socket-jvm Show documentation
Simple multiplatform kotlin coroutines based socket.
package com.ditchoom.socket
import com.ditchoom.buffer.AllocationZone
import com.ditchoom.buffer.SuspendCloseable
import kotlinx.coroutines.flow.Flow
interface ServerSocket : SuspendCloseable {
suspend fun bind(port: Int = -1, host: String? = null, backlog: Int = 0): Flow
fun isListening(): Boolean
fun port(): Int
companion object
}
expect fun ServerSocket.Companion.allocate(
allocationZone: AllocationZone = AllocationZone.Direct
): ServerSocket
© 2015 - 2025 Weber Informatics LLC | Privacy Policy