wangzhengquan
2021-01-28 c813f2bf58edb8b3760f776052a5f708a952ba52
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"
}
# 多线程send
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"
}
# 多线程pub
function mpub() {
   ./test_net_mod_socket --fun="test_net_pub_threads" \
    --publist="localhost:5000, localhost:5000"
@@ -56,9 +70,15 @@
  "msend")
   msend
  ;;
  "send")
   send
  ;;
  "mpub")
   mpub
  ;;
  "pub")
   pub
  ;;
  "close")
    close
  ;;