jvmMain.org.hildan.krossbow.websocket.builtin.BuiltInExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of krossbow-websocket-builtin-jvm Show documentation
Show all versions of krossbow-websocket-builtin-jvm Show documentation
Multiplatform implementation of Krossbow's WebSocket API adapting the platforms' built-in implementations (JS browser's WebSocket, JDK11 client on JVM, NSURLSession on Apple targets).
The newest version!
package org.hildan.krossbow.websocket.builtin
import org.hildan.krossbow.websocket.WebSocketClient
import org.hildan.krossbow.websocket.jdk.Jdk11WebSocketClient
/**
* Gets the [WebSocketClient] implementation that adapts the built-in client from the JVM platform.
*/
actual fun WebSocketClient.Companion.builtIn(): WebSocketClient = Jdk11WebSocketClient()