| | |
| | | function server() { |
| | | |
| | | # 开启bus |
| | | ./test_net_mod_socket --fun="start_bus_server" --key=8 & server_pid=$! && echo "pid: ${server_pid}" |
| | | ./test_net_mod_socket --fun="start_bus_server" & 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_net_client" \ |
| | | --sendlist="localhost:5000:100" \ |
| | | --publist="localhost:5000:8" |
| | | --publist="localhost:5000" |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | function mpub() { |
| | | ./test_net_mod_socket --fun="test_net_pub_threads" \ |
| | | --publist="localhost:5000:8, localhost:5000:8" |
| | | --publist="localhost:5000, localhost:5000" |
| | | |
| | | } |
| | | |
| | |
| | | case ${1} in |
| | | "server") |
| | | close |
| | | sleep 2 |
| | | server |
| | | ;; |
| | | "client") |
| | |
| | | ;; |
| | | "") |
| | | close |
| | | sleep 2 |
| | | server |
| | | client |
| | | ;; |
| | | |
| | | *) |
| | | echo "error input" |
| | | echo "argument input error" |
| | | exit 1 |
| | | ;; |
| | | esac |