TTMSFNCWebSocketFrame Class
Represents a single protocol frame, including its opcode, flags, masking state and payload, and provides serialization to and from the network byte buffer.
API unit family: TMSFNCWebSocketCommon
Syntax
TTMSFNCWebSocketFrame = class
Properties
| Name | Description |
|---|---|
| IsFin | Indicates whether this frame is the final frame of a message. |
| IsMasked | Indicates whether the payload is masked. |
| MaskingKey | Masking key used to mask or unmask the payload when the frame is masked. |
| Opcode | Opcode that classifies the frame as text, binary, or a control frame. |
| PayloadLength | Number of payload bytes carried by the frame. |
| RSV | Reserved protocol bits carried in the frame header. |
| UnmaskedPayload | Payload bytes in their unmasked form. |
Methods
| Name | Description |
|---|---|
| FromBuffer | Reads a single frame from a buffer, fetching any additional payload bytes that are not yet present from the supplied handler. |
| ToBuffer | Serializes the frame into the wire byte sequence, applying length encoding and masking according to the frame state. |
| UnMask | Applies the masking transform to a payload in place, returning the transformed bytes. |