error comparing values in TMSChat demo

I am not sure what you mean with "presumimng sl[2] is a string"? You control how you format the message (as string) when you send it, so it is up to your code to interpret the string returned according to the format you used for sending.

For your other question, do I understand correct you want to create an FMX client app that will connect to and use the websocket chat server?