Implement the send message client API.

For #77 and #78.