def send(self, message):
serialized = message.SerializeToString()<EOL>log_binary(_LOGGER, '<STR_LIT>', Data=serialized)<EOL>if self._chacha:<EOL><INDENT>serialized = self._chacha.encrypt(serialized)<EOL>log_binary(_LOGGER, '<STR_LIT>', Encrypted=serialized)<EOL><DEDENT>data = write_variant(len(serialized)) + serialized<EOL>self._transport.write(data)<EOL>_LOGGER.debug('<STR_LIT>', message)<EOL>
Send message to device.