start.cpp 647 B

123456789101112131415161718192021222324
  1. #include <stdlib.h>
  2. #include "start.hpp"
  3. // Once all the networking is set up, start doing whatever we were asked
  4. // to do on the command line
  5. void start(NetIO &netio, char **args)
  6. {
  7. printf("Reading\n");
  8. for (nodenum_t node_num = 0; node_num < netio.num_nodes; ++node_num) {
  9. if (node_num == netio.me) continue;
  10. NodeIO &node = netio.node(node_num);
  11. node.recv_commands(
  12. // error_cb
  13. [](boost::system::error_code) {
  14. printf("Error\n");
  15. },
  16. // epoch_cb
  17. [](uint32_t epoch) {
  18. printf("Epoch %u\n", epoch);
  19. });
  20. }
  21. }