Package-level declarations
Types
Link copied to clipboard
class KtorWebSocketListener(val scheme: CoapScheme = CoapScheme.COAP_WS, loggerFactory: LoggerFactory = LoggerFactory.Global) : ConnectionListener
Accepts WebSockets for coap+ws and coaps+ws (RFC 8323 §4) on the ktor server, at /.well-known/coap and only with the subprotocol coap (§4.1, §8.3). start runs a standalone server on the ktor engine the application chooses, such as CIO (io.ktor:ktor-server-cio) or Netty; an application that runs its own ktor server mounts the endpoint in its routing with coapOverWebSockets, with the WebSockets plugin installed and, for coaps+ws, behind its TLS. This module brings no engine.
Functions
Link copied to clipboard
Serves CoAP over WebSockets at /.well-known/coap with the subprotocol coap (RFC 8323 §4.1, §8.3), handing every session to listener. Requires the ktor WebSockets plugin; give it no ping period (RFC 8323 §4.4).