def sendMessage(self, data):
opcode = BINARY<EOL>if _check_unicode(data):<EOL><INDENT>opcode = TEXT<EOL><DEDENT>self._sendMessage(False, opcode, data)<EOL>
Send websocket data frame to the client.

If data is a unicode object then the frame is sent as Text.
If the data is a bytearray object then the frame is sent as Binary.