Basically, HTSP is a binary protocol. samples.c contains a few messages encoded using HTSP. I'll do the beginning of the first message for you here :
0x00, 0x00, 0x00, 0x7c are the four first bytes. as per the documentation, this is the root and the first element
||Length||4 byte integer||Total length of message (not including this length field itself) Here the length of the entire message is 0x7c (or 124 bytes).
Next we get into the body.
0x03 → the first byte tells us this part is of type 3. As per the docs : Str||3||UTF-8 encoded string. We expect a string...
0x0a → The second byte tells us the size of the name of the message. 0x0a = 10
0x00, 0x00, 0x00, 0x0c → next four bytes tell us the size of this body's payload. 0x0c = 12
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x6e, 0x61, 0x6d, 0x65 ̣→ 10 bytes - The name of the message in UTF-8. in this case "clientname"
0x48, 0x54, 0x53, 0x20,0x53, 0x68, 0x6f, 0x77, 0x74, 0x69, 0x6d, 0x65 → 12 bytes. The payload => An UTF-8 string. "Showtime"
Then comes a second message body. And a third, fourth ... until we read all 124 bytes of the message.
I hope this helps. I know it took me a day or two just to understand the protocol. Don't give up :)
Serafean.