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

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

There is a newer version: 1.2.1
Show newest version
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