Hi,
i don't know which server you are using, could you tell me more? But from the code example in the article, sendMessage() sends text to the server and the server returns the same text (echo the message that was sent), so in the example you receive what you send. In a real-world application, your server sends messages over WebSocket to which the application is connected. I hope this answers your question.