From c813f2bf58edb8b3760f776052a5f708a952ba52 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 28 一月 2021 17:25:59 +0800
Subject: [PATCH] update

---
 test_net_socket/net_mod_socket.sh |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/test_net_socket/net_mod_socket.sh b/test_net_socket/net_mod_socket.sh
index cd4c809..4b41abc 100755
--- a/test_net_socket/net_mod_socket.sh
+++ b/test_net_socket/net_mod_socket.sh
@@ -9,6 +9,7 @@
 	./test_net_mod_socket --fun="start_reply" --key=100 & server_pid=$! &&  echo "pid: ${server_pid}" 
 }
 
+# 浜や簰寮忓鎴风
 function client() {
 
 	# ./test_net_mod_socket --fun="start_net_client" \
@@ -23,12 +24,25 @@
 	 
 }
 
+# 鏃犻檺寰幆send
+function send() {
+	./test_net_mod_socket --fun="test_net_sendandrecv" \
+	 --sendlist="localhost:5000:100,  localhost:5000:100"
+	 
+}
+# 澶氱嚎绋媠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" \
+	 --publist="localhost:5000, localhost:5000"
+	 
+}
+# 澶氱嚎绋媝ub
 function mpub() {
 	./test_net_mod_socket --fun="test_net_pub_threads" \
 	 --publist="localhost:5000, localhost:5000"
@@ -36,7 +50,7 @@
 }
 
 function close() {
-	ps -ef | grep -e "test_net_mod_socket" -e "net_mod_socket"| awk  '{print $2}' | xargs -i kill -9 {}
+	ps -ef | grep -e "test_net_mod_socket" -e "heart_beat"| awk  '{print $2}' | xargs -i kill -9 {}
 	ipcrm -a
 }
 
@@ -48,8 +62,6 @@
 
 case ${1} in
   "server")
-	close
-	sleep 2
   server
   ;;
   "client")
@@ -58,9 +70,15 @@
   "msend")
 	msend
   ;;
+  "send")
+	send
+  ;;
   "mpub")
 	mpub
   ;;
+  "pub")
+	pub
+  ;;
   "close")
  	close
   ;;

--
Gitblit v1.8.0