From e1bea2c6430ddadd589fd3377b69ca06226bb872 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 08 二月 2021 11:52:53 +0800
Subject: [PATCH] update
---
test_net_socket/net_mod_socket.sh | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/test_net_socket/net_mod_socket.sh b/test_net_socket/net_mod_socket.sh
index 4b41abc..288f192 100755
--- a/test_net_socket/net_mod_socket.sh
+++ b/test_net_socket/net_mod_socket.sh
@@ -7,6 +7,8 @@
# 鎵撳紑璇锋眰搴旂瓟娴嬭瘯鐨勬帴鍙楃
./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}"
}
# 浜や簰寮忓鎴风
@@ -24,18 +26,20 @@
}
-# 鏃犻檺寰幆send
+# 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="localhost:5000:100, localhost:5000:100"
+ --sendlist=" :5000:100, :5000:101, :5000:102"
}
-# 澶氱嚎绋媠end
-function msend() {
- ./test_net_mod_socket --fun="test_net_sendandrecv_threads" \
- --sendlist="localhost:5000:100, localhost:5000:100"
-
-}
+
# 鏃犻檺寰幆 pub
function pub() {
./test_net_mod_socket --fun="test_net_pub" \
@@ -47,6 +51,11 @@
./test_net_mod_socket --fun="test_net_pub_threads" \
--publist="localhost:5000, localhost:5000"
+}
+
+function stop() {
+ ps -ef | grep -e "test_net_mod_socket" -e "heart_beat"| awk '{print $2}' | xargs -i kill -15 {}
+
}
function close() {
@@ -67,8 +76,8 @@
"client")
client
;;
- "msend")
- msend
+ "one_to_many")
+ one_to_many
;;
"send")
send
--
Gitblit v1.8.0