new sendMessage method to send a message to a buffer