Adding polling thread skeleton - not calling it yet - to check server state changes.

I don't like statefulness, but lacking a better idea at the moment.