From f1ae0552e2d50ce6f87a0bad2f31b8e2ec617bb7 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期三, 03 二月 2021 09:39:54 +0800 Subject: [PATCH] update --- test_net_socket/net_mod_socket.sh | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/test_net_socket/net_mod_socket.sh b/test_net_socket/net_mod_socket.sh index fc639ca..52eb54e 100755 --- a/test_net_socket/net_mod_socket.sh +++ b/test_net_socket/net_mod_socket.sh @@ -7,8 +7,11 @@ # 鎵撳紑璇锋眰搴旂瓟娴嬭瘯鐨勬帴鍙楃 ./test_net_mod_socket --fun="start_reply" --key=100 & server_pid=$! && echo "pid: ${server_pid}" + ./test_net_mod_socket --fun="start_reply" --key=101 & server_pid=$! && echo "pid: ${server_pid}" + ./test_net_mod_socket --fun="start_reply" --key=102 & server_pid=$! && echo "pid: ${server_pid}" } +# 浜や簰寮忓鎴风 function client() { # ./test_net_mod_socket --fun="start_net_client" \ @@ -23,12 +26,27 @@ } -function msend() { - ./test_net_mod_socket --fun="test_net_sendandrecv_threads" \ - --sendlist="localhost:5000:100, localhost:5000:100" +# one_to_many send +function one_to_many() { + ./test_net_mod_socket --fun="one_sendto_many" \ + --sendlist=" :5000:100, :5000:101, :5000:102" } +# +function send() { + ./test_net_mod_socket --fun="test_net_sendandrecv" \ + --sendlist=" :5000:100, :5000:101, :5000:102" + +} + +# 鏃犻檺寰幆 pub +function pub() { + ./test_net_mod_socket --fun="test_net_pub" \ + --publist="localhost:5000, localhost:5000" + +} +# 澶氱嚎绋媝ub function mpub() { ./test_net_mod_socket --fun="test_net_pub_threads" \ --publist="localhost:5000, localhost:5000" @@ -53,12 +71,18 @@ "client") client ;; - "msend") - msend + "one_to_many") + one_to_many + ;; + "send") + send ;; "mpub") mpub ;; + "pub") + pub + ;; "close") close ;; -- Gitblit v1.8.0