Merge branch 'master' into dev
| | |
| | | { |
| | | pool.nready--; |
| | | if(process_client(connfd) != 0) { |
| | | LoggerFactory::getLogger()->debug("===server close client %d\n", connfd); |
| | | Close(connfd); //line:conc:echoservers:closeconnfd |
| | | FD_CLR(connfd, &pool.read_set); |
| | | pool.clientfd[i] = -1; |
| | |
| | | rio_t * rio; |
| | | for (auto map_iter = connectionMap.begin(); map_iter != connectionMap.end(); map_iter++) { |
| | | rio = map_iter->second; |
| | | Close(rio->rio_fd); |
| | | if(rio != NULL) { |
| | | free(rio); |
| | | } |
| | |
| | | } |
| | | |
| | | LABEL_ARR_PUSH: |
| | | if(node->host != NULL) { |
| | | strcpy( ret_arr[i].host, node->host); |
| | | } else { |
| | | strcpy( ret_arr[i].host, "local"); |
| | | } |
| | | |
| | | ret_arr[i].port = node->port; |
| | | ret_arr[i].key = node->key; |
| | | ret_arr[i].content = recv_buf; |
| | |
| | | firewall-cmd --state |
| | | # 关闭防火墙 |
| | | systemctl stop firewalld.service |
| | | |
| | | |
| | | ssh -p 100 basic@192.168.5.22:/data/disk2/test/build |
| | | ssh basic@192.168.20.10:/data3/workspace/wzq/build |
| | |
| | | int node_arr_size = 3; |
| | | //192.168.20.104 |
| | | net_node_t node_arr[] = { |
| | | {"192.168.20.104", port, 11}, |
| | | {"192.168.20.104", port, 12}, |
| | | {"192.168.20.104", port, 13} |
| | | {"192.168.5.22", port, 11}, |
| | | {"192.168.20.10", port, 12}, |
| | | {"localhost", port, 13} |
| | | }; |
| | | |
| | | int pub_node_arr_size = 3; |
| | | net_node_t pub_node_arr[] = { |
| | | {"192.168.20.104", port, 8}, |
| | | {"192.168.20.104", port, 8}, |
| | | {"192.168.20.104", port, 8} |
| | | {"192.168.5.22", port, 8}, |
| | | {"192.168.20.10", port, 8}, |
| | | {"localhost", port, 8} |
| | | }; |
| | | |
| | | while (true) { |
| | |
| | | ./dgram_mod_req_rep server 11 & |
| | | ./dgram_mod_req_rep server 12 & |
| | | ./dgram_mod_req_rep server 13 & |
| | | ./dgram_mod_req_rep server 14 & |
| | | |
| | | |
| | | ./dgram_mod_bus server 8 & |
| | | |