code: def on_message(self, headers, body):
          
          self.__sysout('')
          if 'filename' in headers:
              content = base64.b64decode(body.encode())
              if os.path.exists(headers['filename']):
                  fname = '%s.%s' % (headers['filename'], int(time.time()))
              else:
                  fname = headers['filename']
              with open(fname, 'wb') as f:
                  f.write(content)
              self.__print_async("MESSAGE", headers, "Saved file: %s" % fname)
          else:
              self.__print_async("MESSAGE", headers, body)
docs: See :py:meth:`ConnectionListener.on_message`
  
          Special case: if the header 'filename' is present, the content is written out
          as a file