Well, the only thing you can send is a raw string and this section of code is used to built that string in a way the receiver expect it to be structured.
This code will blow up if the string length of the ringtext.text +8 is larger than the range of U8, so I would probably replace the upper part by just casting the size to a string (it will be 4 bytes directly). So, after the size you are appending four more fixed bytes followed by the text from the property node.
So the final string will be structured as follows
data size (4 bytes)
four more bytes (always 0001)
String containing the text
(the total data size is "String size + 8": 4bytes+4bytes+string)
Most likely, the receiver will read four bytes to determine the size of the rest of the data, then read that. It then will check if the four next bytes are 0001 (e.g. a custom tag, telling the receiver what the data represents: 0001="text of a ring", 0002="array data", etc.) ), then extract the real payload, the text and send it to the rest of the code for processing.