Table of Contents

TTMSFNCWebSocketFrame.FromBuffer Method

Reads a single frame from a buffer, fetching any additional payload bytes that are not yet present from the supplied handler.

API unit family: TMSFNCWebSocketCommon Declaring type: TTMSFNCWebSocketFrame

Syntax

class function FromBuffer(var Buffer: TBytes; aIOHandler: TIdIOHandler): TTMSFNCWebSocketFrame;

Parameters

Name Description
Buffer Buffer holding the start of the frame; on return it is reduced to the bytes that remain after the frame is consumed.
aIOHandler Handler used to read remaining payload bytes when the buffer does not yet contain the complete frame.

Returns

A new frame instance populated from the buffer.