langara
06/01/2023, 4:39 PMException in thread "AWT-EventQueue-0 @coroutine#2874" kotlin.NotImplementedError: Request Response is not implemented.
at io.rsocket.kotlin.RSocketKt.notImplemented(RSocket.kt:52)
at io.rsocket.kotlin.RSocketKt.access$notImplemented(RSocket.kt:1)
at io.rsocket.kotlin.RSocket$DefaultImpls.requestResponse(RSocket.kt:38)
at io.rsocket.kotlin.RSocketRequestHandler.requestResponse(RSocketRequestHandler.kt:94)
langara
06/01/2023, 4:47 PMOleg Yukhnevich
06/01/2023, 5:17 PMlangara
06/01/2023, 5:36 PMacceptor { RSocketRequestHandler { requestResponse { ... } } }
inside HttpClient. Can it be that I'm using "dead" RSocket object on server side?Oleg Yukhnevich
06/01/2023, 5:40 PMlangara
06/02/2023, 10:09 AMfun RSocketRequestHandlerBuilder.fireAndForget
block as receiver (and this lead to exception later when trying to use this RSocket object). The fix I now have is to ignore that RSocket, and use the ConnectionAcceptorContext.requester
available (in less convenient place) earlier when I'm calling fun Route.rSocket
. It works but I'm yet not sure if it's the right thing to do. I see there is yet another RSocket object available (or maybe it's the same) returned by: fun RSocketRequestHandler
, so maybe I should use this one...langara
06/02/2023, 10:26 AMfun Application.simpleModule(...) {
install(WebSockets)
install(RSocketSupport) {
server = ....
}
routing {
rSocket(path) {
val rs1 = requester
val rs2 = RSocketRequestHandler(configure = myconfigure)
rs2
}
}
}
....
fun RSocketRequestHandlerBuilder.myconfigure() {
fireAndForget {
val rs3 = this
myregistrar(RemoteTreeBrowser(rs3, log))
}
}
So there are three vals: rs1, rs2, rs3. My question would be why so many, and when to use which. (it's all server side, and only one client is connecting)
My oryginal approach was to use rs3 and it throws exception later on when RemoteTreeBrowser tries to do rs3.requestResponse(...). Now I swapped it to use rs1 instead and it works, but still not sure if I'm doing it right / as intended.langara
06/02/2023, 10:31 AMOleg Yukhnevich
06/02/2023, 11:11 AM