After the connect, the application may also send messages. Below is a snippet of code that sends a message: