1
0

tcp_client.sh 1.1 KB

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # This is an example of a script to run a "unsecure" TURN TCP client.
  4. # Options:
  5. # 1) -t is present, it means that TCP networking is used.
  6. # 5) -n 1000 means 1000 messages per single emulated client. Messages
  7. # are sent with interval of 20 milliseconds, to emulate an RTP stream.
  8. # 6) -m 10 means that 10 clients are emulated.
  9. # 7) -l 170 means that the payload size of the packets is 170 bytes
  10. # (like average audio RTP packet).
  11. # 8) -e 127.0.0.1 means that the clients will use peer address 127.0.0.1.
  12. # 9) -g means "set DONT_FRAGMENT parameter in TURN requests".
  13. # 10) -s option is absent - it means that the client will be using
  14. # the "channel" mechanism for data.
  15. # 11) -X means that IPv4 relay address is requested.
  16. # 12) ::1 (the last parameter) is the TURN Server IP address. We use IPv6 here
  17. # to illustrate how the TURN Server convert the traffic from IPv6 to IPv4 and back.
  18. #
  19. if [ -d examples ] ; then
  20. cd examples
  21. fi
  22. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/
  23. PATH=examples/bin/:../bin:bin/:${PATH} turnutils_uclient -t -n 1000 -m 10 -l 3037 -e 127.0.0.1 -g -X $@ ::1