ServerHandler

interface ServerHandler<S : ServerScope<*>>

A Krosstalk server handler. Should help you set up receiver endpoints for all Krosstalk methods (Krosstalk.methods), which should each call handle for their method. No behavior is defined here as what is necessary to do that, and where and how you will want to call it, will vary widely depending on which server you are using.

You will almost certainly want to use Endpoint.resolve to handle endpoint templates. Endpoint.allResolvePaths is available as well, but is not yet well supported, you would have to write your own resolution code or use your server implementation's.

See the krosstalk-ktor-server artifact for an example server implementation using Ktor.

Sources

Link copied to clipboard