code: def send(self, message):
          
          if not isinstance(message, (Msg, MsgProto)):
              raise ValueError("Expected Msg or MsgProto, got %s" % message)
  
          if self.steam_id:
              message.steamID = self.steam_id
          if self.session_id:
              message.sessionID = self.session_id
  
          if self.verbose_debug:
              self._LOG.debug("Outgoing: %s\n%s" % (repr(message), str(message)))
          else:
              self._LOG.debug("Outgoing: %s", repr(message))
  
          data = message.serialize()
  
          if self.channel_key:
              if self.channel_hmac:
                  data = crypto.symmetric_encrypt_HMAC(data, self.channel_key, self.channel_hmac)
              else:
                  data = crypto.symmetric_encrypt(data, self.channel_key)
  
          self.connection.put_message(data)
docs: Send a message
  
          :param message: a message instance
          :type message: :class:`steam.core.msg.Msg`, :class:`steam.core.msg.MsgProto`