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

commonMain.com.caesarealabs.rpc4k.runtime.user.ClientUsage.kt Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package com.caesarealabs.rpc4k.runtime.user

import com.caesarealabs.rpc4k.runtime.api.RpcClientFactory
import com.caesarealabs.rpc4k.runtime.api.SerializationFormat
import com.caesarealabs.rpc4k.runtime.api.components.JsonFormat

public fun  Rpc4kIndex.client(
    url: String,
//     TODO: MPP default
    client: RpcClientFactory /*= RpcClientFactory.OkHttp()*/,
    format: SerializationFormat = JsonFormat(),
    x: Int = 2
): C {
    val websocketUrl = "$url/events"
    val clientSetup = client.build(url, websocketUrl)
    return createNetworkClient(clientSetup, format)
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy