async def dump_message(self, msg, msg_type=None):
mtype = msg.__class__ if msg_type is None else msg_type<EOL>fields = mtype.f_specs()<EOL>for field in fields:<EOL><INDENT>await self.message_field(msg=msg, field=field)<EOL><DEDENT>
Dumps message to the writer.

:param msg:
:param msg_type:
:return: