udp_c2c_client.sh 1.2 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. #
  3. # This is an example of a script to run a "unsecure" TURN UDP client,
  4. # in client-to-client fashion (when client talks to another client
  5. # through their corresponding allocated relayed endpoints).
  6. # Options:
  7. # 1) -t is absent, it means that UDP networking is used.
  8. # 5) -n 1000 means 1000 messages per single emulated client. Messages
  9. # are sent with interval of 20 milliseconds, to emulate an RTP stream.
  10. # 6) -m 10 means that 10 clients are emulated.
  11. # 7) -y means "client to client" communication pattern.
  12. # the client calculates the peer address
  13. # (which is the allocated relayed endpoint of the next client in array of clients).
  14. # 8) -l 170 means that the payload size of the packets is 170 bytes
  15. # like average audio RTP packet).
  16. # 9) -s option is absent - it means that the client will be using
  17. # the "channel" mechanism for data.
  18. # 10) 127.0.0.1 (the last parameter) is the TURN Server IP address.
  19. # 11) -z 5 means that we want 5 ms interval between the packets (per each session).
  20. #
  21. if [ -d examples ] ; then
  22. cd examples
  23. fi
  24. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/
  25. PATH=examples/bin/:../bin/:bin/:${PATH} turnutils_uclient -n 1000 -m 10 -y -l 170 -z 15 $@ 127.0.0.1