Implement message writer.

More @ http://tools.ietf.org/html/rfc6455#section-10.3