| | |
| | | ./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" \ |
| | |
| | | |
| | | } |
| | | |
| | | # 无限循环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" |
| | |
| | | "msend") |
| | | msend |
| | | ;; |
| | | "send") |
| | | send |
| | | ;; |
| | | "mpub") |
| | | mpub |
| | | ;; |
| | | "pub") |
| | | pub |
| | | ;; |
| | | "close") |
| | | close |
| | | ;; |