Starts a loop where first a connection is established. Once we have a connection, new commands are queried periodically.
each loop round has a delay of configuration.sleepDuration ms
repeats while active (use close() to stop)