Dumps message to the writer.

        :param msg:
        :param msg_type:
        :return:

async def dump_message(self, msg, msg_type=None):
        """
        Dumps message to the writer.

        :param msg:
        :param msg_type:
        :return:
        """
        mtype = msg.__class__ if msg_type is None else msg_type
        fields = mtype.f_specs()
        for field in fields:
            await self.message_field(msg=msg, field=field)