wangzhengquan
2021-02-02 cb85aa8a8d02a3d6dc16e3f32e78da9e70f9c7f5
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"
    
}
# 多线程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" \
@@ -67,8 +71,8 @@
  "client")
    client
  ;;
  "msend")
   msend
  "one_to_many")
   one_to_many
  ;;
  "send")
   send