From f1f0423f63cc9f39fa74fc9b68bb680f1d1abd31 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 31 Mar 2019 00:06:25 +0100 Subject: Websockets implementation --- .../kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'kvision-modules/kvision-server-jooby/src/main') diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index d1e64ce4..cfd9d467 100644 --- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -25,6 +25,8 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.google.inject.Injector import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.channels.ReceiveChannel +import kotlinx.coroutines.channels.SendChannel import kotlinx.coroutines.launch import org.jooby.Kooby import org.jooby.Request @@ -310,6 +312,19 @@ actual open class KVServiceManager actual constructor(val serviceClass: } } + /** + * Binds a given web socket connetion with a function of the receiver. + * @param function a function of the receiver + * @param route a route + */ + protected actual inline fun bind( + noinline function: suspend T.(ReceiveChannel, SendChannel) -> Unit, + route: String? + ) { + TODO("Not implemented in Jooby module") + } + + /** * Binds a given function of the receiver as a select options source * @param function a function of the receiver -- cgit