def send(self, message):
if isinstance(message, bytes):<EOL><INDENT>message = message.decode("<STR_LIT:utf8>")<EOL><DEDENT>with self.send_lock:<EOL><INDENT>try:<EOL><INDENT>self.ws.send(message)<EOL><DEDENT>except socket.error:<EOL><INDENT>chat_backend.unsubscribe(self)<EOL><DEDENT><DEDENT>
Send a single message to the websocket.