Implement message writer.

It came for free with supporting payloads for close frames.