File was renamed from test_net_socket/net_mod_socket.c |
| | |
| | | char topic[512]; |
| | | |
| | | int recv_arr_size, i, n; |
| | | int node_arr_size = 3; |
| | | |
| | | |
| | | net_mod_recv_msg_t *recv_arr; |
| | | //192.168.20.104 |
| | | int node_arr_size = 2; |
| | | net_node_t node_arr[] = { |
| | | {"192.168.5.22", port, 11}, |
| | | {"192.168.20.104", port, 21}, |
| | | // {"192.168.5.22", port, 11}, |
| | | {"192.168.20.10", port, 11}, |
| | | {"192.168.20.104", port, 11} |
| | | }; |
| | | |
| | |
| | | int i,j, n, recv_arr_size; |
| | | net_mod_recv_msg_t *recv_arr; |
| | | |
| | | int node_arr_size = 1; |
| | | int node_arr_size = 2; |
| | | //192.168.20.104 |
| | | net_node_t node_arr[] = { |
| | | {NULL, port, 11} |
| | | // {"192.168.5.22", port, 11}, |
| | | {"192.168.20.10", port, 11}, |
| | | {"192.168.20.104", port, 11} |
| | | }; |
| | | |
| | | void * client = net_mod_socket_open(); |
| | |
| | | |
| | | void mclient(int port) { |
| | | |
| | | int status, i = 0, processors = 4; |
| | | int status, i = 0, processors = 2; |
| | | void *res[processors]; |
| | | // Targ *targs = (Targ *)calloc(processors, sizeof(Targ)); |
| | | Targ targs[processors]; |
| | |
| | | struct timeval start, end; |
| | | long total = 0; |
| | | |
| | | printf("开始测试...\n"); |
| | | gettimeofday(&start, NULL); |
| | | for (i = 0; i < processors; i++) { |
| | | targs[i].port = port; |