def METHOD_NAME(self):
    while not self.shutdown.is_set():
        try:
            data, addr = self.socket.recvfrom(1024)
            if not data:
                return
            data = data.decode()
            print('Reply[' + addr[0] + ':' + str(addr[1]) + '] - ' + data)
            reply = 'OK: ' + data
            self.socket.sendto(reply.encode(), addr)
        except socket.error as e:
            print('Running server failed:{}'.format(e))
            raise
        if not self.persist:
            break