Instance Propertyswift-nio 2.72.0NIOWebSocket
extensionData
The extension data, if any.
WebSocketFrame.swift:245var extensionData: ByteBuffer? { get set }
On frames received from the network, this data is not necessarily unmasked. This is to provide as much information as possible. If unmasked data is desired, either use the computed unmaskedExtensionData
property to obtain it, or transform this data directly by calling extensionData.unmask(maskKey)
.
Other members in extension
Type members
init(allocator: ByteBufferAllocator
) Creates an empty
WebSocketFrame
.init(fin: Bool, rsv1: Bool, rsv2: Bool, rsv3: Bool, opcode: WebSocketOpcode, maskKey: WebSocketMaskingKey?, data: ByteBuffer, extensionData: ByteBuffer?
) Create a
WebSocketFrame
with the given properties.
Instance members
var data: ByteBuffer
The application data.
var fin: Bool
The value of the
fin
bit. If set, this is the last frame in a fragmented frame. If not set, this frame is one of the intermediate frames in a fragmented frame. Must be set if a frame is not fragmented at all.var length: Int
The total length of the data in the frame.
var maskKey: WebSocketMaskingKey?
The masking key, if any.
var opcode: WebSocketOpcode
The opcode for this frame.
var rsv1: Bool
The value of the first reserved bit. Must be
false
unless using an extension that defines its use.var rsv2: Bool
The value of the second reserved bit. Must be
false
unless using an extension that defines its use.var rsv3: Bool
The value of the third reserved bit. Must be
false
unless using an extension that defines its use.var unmaskedData: ByteBuffer
The unmasked application data.
var unmaskedExtensionData: ByteBuffer?
The unmasked extension data.