rpc

fun Route.rpc(path: String, builder: KrpcRoute.() -> Unit)(source)

Adds an RPC route to the specified Route. Provides builder to configure kotlinx.rpc.RpcServer that will be used internally. Note that the WebSockets plugin is required for such a route to work.

Parameters

path

The relative path on which RPC server should mount.

builder

Builder function to configure RPC server.


fun Route.rpc(builder: KrpcRoute.() -> Unit)(source)

Adds an RPC route to the specified Route. Provides builder to configure kotlinx.rpc.RpcServer that will be used internally. Note that the WebSockets plugin is required for such a route to work.

Parameters

builder

Builder function to configure RPC server.