NIOWebSocket
import NIOWebSocket
import NIOWebSocket
enum NIOWebSocketError
Errors thrown by the NIO websocket module.
enum WebSocketErrorCode
An enum that represents websocket error codes.
struct NIOWebSocketUpgradeError
Errors that can be thrown by NIOWebSocket
during protocol upgrade.
struct WebSocketFrame
A structured representation of a single WebSocket frame.
struct WebSocketMaskingKey
A single 4-byte websocket masking key.
struct WebSocketOpcode
An operation code for a websocket frame.
class NIOWebSocketClientUpgrader
A HTTPClientProtocolUpgrader
that knows how to do the WebSocket upgrade dance.
class NIOWebSocketFrameAggregator
NIOWebSocketFrameAggregator
buffers inbound fragmented WebSocketFrame
’s and aggregates them into a single WebSocketFrame
. It guarantees that a WebSocketFrame
with an opcode
of .continuation
is never forwarded. Frames which are not fragmented are just forwarded without any processing. Fragmented frames are unmasked, concatenated and forwarded as a new WebSocketFrame
which is either a .binary
or .text
frame. extensionData
, rsv1
, rsv2
and rsv3
are lost if a frame is fragmented because they cannot be concatenated.
class NIOWebSocketServerUpgrader
A HTTPServerProtocolUpgrader
that knows how to do the WebSocket upgrade dance.
class WebSocketFrameDecoder
An inbound ChannelHandler
that deserializes websocket frames into a structured format for further processing.
class WebSocketFrameEncoder
An inbound ChannelHandler
that serializes structured websocket frames into a byte stream for sending on the network.
class WebSocketProtocolErrorHandler
A simple ChannelHandler
that catches protocol errors emitted by the WebSocketFrameDecoder
and automatically generates protocol error responses.