From 03e123528df6316e574a503237e1b9a9c1628da1 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期四, 14 一月 2021 14:32:18 +0800 Subject: [PATCH] update build.sh --- test_net_socket/net_mod_socket.sh | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/test_net_socket/net_mod_socket.sh b/test_net_socket/net_mod_socket.sh index d9f6096..cd4c809 100755 --- a/test_net_socket/net_mod_socket.sh +++ b/test_net_socket/net_mod_socket.sh @@ -1,12 +1,12 @@ function server() { # 寮�鍚痓us - ./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_reply" --key=11 & server_pid=$! && echo "pid: ${server_pid}" + ./test_net_mod_socket --fun="start_reply" --key=100 & server_pid=$! && echo "pid: ${server_pid}" } function client() { @@ -17,15 +17,21 @@ ./test_net_mod_socket --fun="start_net_client" \ - --sendlist="localhost:5000:11" \ - --publist="localhost:5000:8" + --sendlist="localhost:5000:100" \ + --publist="localhost:5000" } -function mclient() { - ./test_net_mod_socket --fun="start_net_mclient" \ - --sendlist="localhost:5000:11" +function msend() { + ./test_net_mod_socket --fun="test_net_sendandrecv_threads" \ + --sendlist="localhost:5000:100, localhost:5000:100" + +} + +function mpub() { + ./test_net_mod_socket --fun="test_net_pub_threads" \ + --publist="localhost:5000, localhost:5000" } @@ -43,25 +49,30 @@ case ${1} in "server") close + sleep 2 server ;; "client") client ;; - "mclient") - mclient + "msend") + msend + ;; + "mpub") + mpub ;; "close") close ;; "") close + sleep 2 server client ;; *) - echo "error input" + echo "argument input error" exit 1 ;; esac -- Gitblit v1.8.0