TTMSFNCCustomWebSocketServer.TransformCloseData Method
Extracts the status code and optional reason text from the payload of a received close frame.
API unit family: TMSFNCWebSocketServer
Declaring type: TTMSFNCCustomWebSocketServer
Syntax
class function TransformCloseData(ABytes: TBytes; out AReason: string): Word;
Parameters
| Name | Description |
|---|---|
ABytes |
The raw payload of the close frame. |
AReason |
Receives the decoded reason text, or an empty string when no reason is present. |
Returns
The close status code, or 0 when the payload does not contain one.