Sends data to the server.

def send(self, data):
        """
        Sends data to the server.
        """
        self.logger.debug('Send data: {}'.format(data))

        if not self.connected:
            self.logger.warning('Connection not established. Return...')
            return

        self.websocket.send(json.dumps(data))