   uint8_t identity[6] = {'P', 'h', 'o', 't', 'o', 'n'};
   dealer.setIdentity(identity, 6);
 
-  int tries = 0;
-  while (!dealer.ready()) {
-    Serial.println("Not ready yet.");
-    if (++tries > 5) {
-      end();
-    }
-    delay(1000);
-    dealer.update();
-  }
+  waitUntilReady(dealer);
 
   {
     uint8_t data[5] = {'H', 'e', 'l', 'l', 'o'};

    router.send(frame);
    zmtp_frame_destroy(&frame);
  }

  delay(1000);

  end();

    dealer.send(frame);
    zmtp_frame_destroy(&frame);
  }
}

void runRouterTest() {
  ZMTPSocket router(ROUTER);

  router.bind(1235);

  zmtp_frame_t *question = waitUntilRecv(router);

  // TODO(schoon) - Receive identity frame first.
  // HACK(schoon) - The zmtp_frame API doesn't tell us about framing, so
