wangzhengquan
2021-02-08 e1bea2c6430ddadd589fd3377b69ca06226bb872
test_net_socket/net_mod_socket.sh
@@ -26,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"
    
}
# 多线程send
function msend() {
   ./test_net_mod_socket --fun="test_net_sendandrecv_threads" \
    --sendlist="localhost:5000:100, localhost:5000:100"
#
function send() {
   ./test_net_mod_socket --fun="test_net_sendandrecv" \
    --sendlist=" :5000:100, :5000:101, :5000:102"
    
}
# 无限循环 pub
function pub() {
   ./test_net_mod_socket --fun="test_net_pub" \
@@ -51,6 +53,11 @@
    
}
function stop() {
   ps -ef | grep -e "test_net_mod_socket" -e "heart_beat"| awk  '{print $2}' | xargs -i kill -15 {}
}
function close() {
   ps -ef | grep -e "test_net_mod_socket" -e "heart_beat"| awk  '{print $2}' | xargs -i kill -9 {}
   ipcrm -a