WebSocketDeflateExtension
class WebSocketDeflateExtension : WebSocketExtension<WebSocketDeflateExtension.Config>
Content copied to clipboard
Compress and decompress WebSocket frames to reduce amount of transferred bytes.
Usage
install(WebSockets) {
extensions {
install(WebSocketDeflateExtension)
}
}
Content copied to clipboard
Implements WebSocket deflate extension from RFC-7692. This implementation is using window size = 15 due to limitations of Deflater implementation.
Types
Link copied to clipboard
object Companion : WebSocketExtensionFactory<WebSocketDeflateExtension.Config, WebSocketDeflateExtension>
Content copied to clipboard
Functions
Link copied to clipboard
open override fun clientNegotiation(negotiatedProtocols: List<WebSocketExtensionHeader>): Boolean
Content copied to clipboard
This method is called only for a client, when it receives the WebSocket upgrade response.
Link copied to clipboard
This method is called on each incoming frame before handling it in WebSocket session.
Link copied to clipboard
This method is called on each outgoing frame and handle it before sending.
Link copied to clipboard
open override fun serverNegotiation(requestedProtocols: List<WebSocketExtensionHeader>): List<WebSocketExtensionHeader>
Content copied to clipboard
This method is called only for a server, when it receives websocket session.
Properties
Link copied to clipboard
open override val factory: WebSocketExtensionFactory<WebSocketDeflateExtension.Config, out WebSocketExtension<WebSocketDeflateExtension.Config>>
Content copied to clipboard
Reference to the WebSocketExtensionFactory, which produced this extension.