Update client code to handle connections.