Package io.ktor.websocket
Types
Websocket close reason
Default websocket session with ping-pong and timeout processing and built-in closeReason population
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
A frame received or ready to be sent. It is not reusable and not thread-safe
Raised when the frame is bigger than allowed in a current websocket 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 plugins.
Class that continuously reads a byteChannel and converts into Websocket Frame exposing them in incoming.
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.
Find the extensions using WebSocketExtensionFactory.
Search the extensions using WebSocketExtensionFactory.
Parse Sec-WebSocket-Accept
header.
Creates a RAW web socket session from connection
Creates a RAW web socket session from connection
Creates a RAW web socket session from connection
Reads bits from ByteReadChannel and converts into Websocket Frame.
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
Serializes WebSocket Frame and writes the bits into the ByteWriteChannel. If masking is true, then data will be masked with random mask