udp_client.sh 1.2 KB

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