def send(self, content):
LOGGER.debug('<STR_LIT>', content)<EOL>all_bytes = struct.pack('<STR_LIT>', Connection.PROTOCOL_VERSION)<EOL>all_bytes += struct.pack('<STR_LIT>', self._id)<EOL>all_bytes += struct.pack('<STR_LIT>', <NUM_LIT:2>)<EOL>self._id += <NUM_LIT:1><EOL>for char in content:<EOL><INDENT>all_bytes += struct.pack('<STR_LIT>', char.encode('<STR_LIT:utf8>'))<EOL><DEDENT>encrypted_bytes = self._crypt.encrypt(all_bytes)<EOL>message_length = Connection.COMM_LENGTH + len(encrypted_bytes)<EOL>self._socket.send(struct.pack('<STR_LIT>', message_length))<EOL>self._socket.send(struct.pack('<STR_LIT>', Connection.NO_COMM_ERROR))<EOL>self._socket.send(encrypted_bytes)<EOL>LOGGER.debug('<STR_LIT>')<EOL>message = self.recv()<EOL>while message is None:<EOL><INDENT>message = self.recv()<EOL>yield message<EOL><DEDENT>yield message<EOL>
Sends a JavaScript command to PS

        :param content: Script content
        :type content: str
        :yields: :class:`.Message`