In client.cc: Need a processEvents loop.