From 14b40473fc2fcad52fdefa632863b7aa76bb2bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Thu, 10 Mar 2022 16:34:47 +0100 Subject: [PATCH] * Added some clarifying comments for TWSMessage data --- packages/fcl-web/src/websocket/fpwebsocket.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/fcl-web/src/websocket/fpwebsocket.pp b/packages/fcl-web/src/websocket/fpwebsocket.pp index 23de629d1c..e3ec07508e 100644 --- a/packages/fcl-web/src/websocket/fpwebsocket.pp +++ b/packages/fcl-web/src/websocket/fpwebsocket.pp @@ -266,8 +266,13 @@ type PayLoad : TBytes; Sequences : TFrameSequences; IsText : Boolean; + // Use these only when IsText is true (PayLoad contains valid UTF-8). + // You may use try to use them when IsText is false, but there is no guarantee they will give correct results. + // Return Payload as a UTF8 string Property AsString : UTF8String Read GetAsString; + // Return Payload as a UTF8 string Property AsUTF8String : UTF8String Read GetAsString; + // Return Payload (assumed to contain valid UTF8) as a UTF16 string Property AsUnicodeString : UnicodeString Read GetAsUnicodeString; end;