The server example was expanded with threads for control