| | |
| | | |
| | | # 打开请求应答测试的接受端 |
| | | ./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}" |
| | | } |
| | | |
| | | # 交互式客户端 |
| | |
| | | } |
| | | |
| | | # 无限循环send |
| | | function send() { |
| | | ./test_net_mod_socket --fun="test_net_sendandrecv" \ |
| | | --sendlist="localhost:5000:100, localhost:5000:100" |
| | | function one_to_many() { |
| | | ./test_net_mod_socket --fun="one_sendto_many" \ |
| | | --sendlist=" :5000:100, :5000:101, :5000:102" |
| | | |
| | | } |
| | | # 多线程send |
| | |
| | | "client") |
| | | client |
| | | ;; |
| | | "msend") |
| | | msend |
| | | "one_to_many") |
| | | one_to_many |
| | | ;; |
| | | "send") |
| | | send |