commonMain.com.ditchoom.socket.ClientToServerSocket.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.socket
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
import kotlin.time.ExperimentalTime
@ExperimentalTime
@ExperimentalUnsignedTypes
interface ClientToServerSocket : ClientSocket {
suspend fun open(
port: UShort,
timeout: Duration = seconds(1),
hostname: String? = null,
socketOptions: SocketOptions? = null
): SocketOptions
}