This currently uses the run queue to poll for messages from the server, which works OK in typical desktop programs but not in other environments.