| | |
| | | function server() { |
| | | |
| | | # 开启bus |
| | | # 开启bus |
| | | ./test_net_mod_socket --fun="start_bus_server" --key=8 & server_pid=$! && echo "pid: ${server_pid}" |
| | | # 开启网络转发代理 |
| | | # 开启网络转发代理 |
| | | ./test_net_mod_socket --fun="start_net_proxy" --port=5000 & server_pid=$! && echo "pid: ${server_pid}" |
| | | |
| | | |
| | | # 打开请求应答测试的接受端 |
| | | # 打开请求应答测试的接受端 |
| | | ./test_net_mod_socket --fun="start_reply" --key=11 & server_pid=$! && echo "pid: ${server_pid}" |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | function close() { |
| | | ps -ef | grep -e "dgram_mod_req_rep" -e "net_mod_socket" -e "dgram_mod_bus" | awk '{print $2}' | xargs -i kill -9 {} |
| | | ps -ef | grep -e "test_net_mod_socket" -e "net_mod_socket"| awk '{print $2}' | xargs -i kill -9 {} |
| | | ipcrm -a |
| | | } |
| | | |
| | |
| | | client |
| | | ;; |
| | | "mclient") |
| | | |
| | | mclient |
| | | ;; |
| | | "close") |