From f462d191f5ded9f9992837862fd97f5c1a536bce Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期二, 01 十二月 2020 16:49:33 +0800
Subject: [PATCH] update
---
test_net_socket/net_mod_socket.sh | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/test_net_socket/net_mod_socket.sh b/test_net_socket/net_mod_socket.sh
index 4ae2223..38bfcaa 100755
--- a/test_net_socket/net_mod_socket.sh
+++ b/test_net_socket/net_mod_socket.sh
@@ -1,12 +1,11 @@
function server() {
-# 寮�鍚痓us
+ # 寮�鍚痓us
./test_net_mod_socket --fun="start_bus_server" --key=8 & 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}"
}
@@ -24,14 +23,20 @@
}
-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:11, localhost:5000:11"
+
+}
+
+function mpub() {
+ ./test_net_mod_socket --fun="test_net_pub_threads" \
+ --publist="localhost:5000:8, localhost:5000:8"
}
function close() {
- ps -ef | grep -e "dgram_mod_req_rep" -e "net_mod_socket" -e "dgram_mod_bus" | awk '{print $2}' | xargs -i kill -9 {}
+ ps -ef | grep -e "test_net_mod_socket" -e "net_mod_socket"| awk '{print $2}' | xargs -i kill -9 {}
ipcrm -a
}
@@ -49,9 +54,11 @@
"client")
client
;;
- "mclient")
-
- mclient
+ "msend")
+ msend
+ ;;
+ "mpub")
+ mpub
;;
"close")
close
--
Gitblit v1.8.0