Functions for sending messages.
Connect, optionally authenticate, send message and disconnect.
Send a message, including (if applicable) its metadata and payload.