def send_pack(self, message):
        # TODO: Just do escaping
        msg = '<script>\np(%s);\n</script>\r\n' % proto.json_encode(message)

        self.write(msg)
        self.flush()

        # Close connection based on amount of data transferred
        if self.should_finish(len(msg)):
            self._detach()
            self.safe_finish()
dataset/ETHPy150Open flaviogrossi/sockjs-cyclone/sockjs/cyclone/transports/htmlfile.py/HtmlFileTransport.send_pack/original