state-machine comms for client