code: def send_text(self, message, opcode=OPCODE_TEXT):
          
  
          # Validate message
          if isinstance(message, bytes):
              message = try_decode_UTF8(message)  # this is slower but ensures we have UTF-8
              if not message:
                  logger.warning("Can\'t send message, message is not valid UTF-8")
                  return False
          elif sys.version_info < (3,0) and (isinstance(message, str) or isinstance(message, unicode)):
              pass
          elif isinstance(message, str):
              pass
          else:
              logger.warning('Can\'t send message, message has to be a string or bytes. Given type is %s' % type(message))
              return False
  
          header  = bytearray()
          payload = encode_to_UTF8(message)
          payload_length = len(payload)
  
          # Normal payload
          if payload_length <= 125:
              header.append(FIN | opcode)
              header.append(payload_length)
  
          # Extended payload
          elif payload_length >= 126 and payload_length <= 65535:
              header.append(FIN | opcode)
              header.append(PAYLOAD_LEN_EXT16)
              header.extend(struct.pack(">H", payload_length))
  
          # Huge extended payload
          elif payload_length < 18446744073709551616:
              header.append(FIN | opcode)
              header.append(PAYLOAD_LEN_EXT64)
              header.extend(struct.pack(">Q", payload_length))
  
          else:
              raise Exception("Message is too big. Consider breaking it into chunks.")
              return
  
          self.request.send(header + payload)
docs: Important: Fragmented(=continuation) messages are not supported since
          their usage cases are limited - when we don't know the payload length.