wangzhengquan
2021-01-18 71c847e99c0ce99fae955b08c0aafecb0fb9bdd6
test_net_socket/test_net_mod_socket.cpp
@@ -2,7 +2,7 @@
#include "net_mod_socket_wrapper.h"
#include "bus_server_socket_wrapper.h"
#include "shm_mm_wraper.h"
#include "shm_mm_wrapper.h"
#include "usg_common.h"
#include <getopt.h>
@@ -187,7 +187,8 @@
       
        if (fgets(content, MAXLINE, stdin) != NULL) {
           // 收到消息的节点即使没有对应的信息, 也要回复一个表示无的消息,否则会一直等待
          n = net_mod_socket_sendandrecv(client, node_arr, node_arr_size, content, strlen(content), &recv_arr, &recv_arr_size);
          // n = net_mod_socket_sendandrecv(client, node_arr, node_arr_size, content, strlen(content), &recv_arr, &recv_arr_size);
        n = net_mod_socket_sendandrecv_timeout(client, node_arr, node_arr_size, content, strlen(content), &recv_arr, &recv_arr_size, 1000);
          printf(" %d nodes reply\n", n);
          for(i=0; i<recv_arr_size; i++) {
             printf("host:%s, port: %d, key:%d, content: %s\n",