Communication between asynchronous server and synchronous client