zhangmeng
2024-04-09 2561a007b8d8999a4750046d0cfb3b1ad5af50ac
test_socket/bus_test.cpp
@@ -63,16 +63,13 @@
  char content[512];
  long i = 0;
  pthread_create(&tid, NULL, run_recv, (void *)sk);
  while (true) {
    //printf("Usage: pub <topic> [content] or sub <topic>\n");
    printf("Can I help you? sub, pub, desub or quit %d\n", i++);
    printf("client 1\n");
    // scanf("%s", action);
    std::cin >> action;
    printf("client 2\n");
    if(strcmp(action, "sub") == 0) {
      printf("Please input topic!\n");
      scanf("%s", topic);
@@ -138,4 +135,4 @@
  
  return 0;
}
}