def send(self, payload, opcode=ABNF.OPCODE_TEXT):
        frame = ABNF.create_frame(payload, opcode)
        if self.get_mask_key:
            frame.get_mask_key = self.get_mask_key
        data = frame.format()
        length = len(data)
        if traceEnabled:
            logger.debug("send: " + repr(data))
        while data:
            l = self._send(data)
            data = data[l:]
        return length
Send the data as string.
dataset/ETHPy150Open tomwilkie/awesomation/third_party/py/websocket-client/websocket.py/WebSocket.send