Package io.ktor.http.cio.websocket
Types
Websocket close reason
Default websocket session with ping-pong and timeout processing and built-in closeReason population
Default websocket session with ping-pong and timeout processing and built-in closeReason population
Default websocket session with ping-pong and timeout processing and built-in closeReason population
Default web socket session implementation that handles ping-pongs, close sequence and frame fragmentation
A frame received or ready to be sent. It is not reusable and not thread-safe
A frame received or ready to be sent. It is not reusable and not thread-safe
A frame received or ready to be sent. It is not reusable and not thread-safe
Represents a RAW web socket session
Compress and decompress WebSocket frames to reduce amount of transferred bytes.
WebSocket extension instance. This instance is created for each WebSocket request, for every installed extension by WebSocketExtensionFactory.
Factory that defines WebSocket extension. The factory is used in pair with WebSocketExtensionsConfig.install method to install WebSocket extension in client or server.
Parsed Sec-WebSocket-Accept
header item representation.
Extensions configuration for WebSocket client and server features.
API marked with this annotation is internal and not intended to be used outside of ktor It is not recommended to use it as it may be changed in the future without notice or it may be too low-level so could damage your data.
Class that continuously reads a byteChannel and converts into Websocket Frame exposing them in incoming.
Represents a web socket session between two peers
Represents a web socket session between two peers
Represents a web socket session between two peers
Class that processes written outgoing Websocket Frame, serializes them and writes the bits into the writeChannel.
Functions
Send a close frame with the specified reason. May suspend if outgoing channel is full. The specified reason could be ignored if there was already close frame sent (for example in reply to a peer close frame). It also may do nothing when a session or an outgoing channel is already closed due to any reason.
Closes session with normal or error close reason, depending on whether cause is cancellation or not.
Create DefaultWebSocketSession from session.
Create DefaultWebSocketSession from session.
Create DefaultWebSocketSession from session.
Find the extensions using WebSocketExtensionFactory.
Search the extensions using WebSocketExtensionFactory.
Parse Sec-WebSocket-Accept
header.
Launch pinger coroutine on CoroutineScope that is sending ping every specified periodMillis to outgoing channel, waiting for and verifying client's pong frames. It is also handling timeoutMillis and sending timeout close frame
Launch a ponger actor job on the CoroutineScope sending pongs to outgoing channel. It is acting for every client's ping frame and replying with corresponding pong
Read close reason from close frame or null if no close reason provided
Read text content from text frame. Shouldn't be used for fragmented frames: such frames need to be reassembled first