srinag63 / rfc5766-turn-server

Automatically exported from code.google.com/p/rfc5766-turn-server
0 stars 0 forks source link

TCP not controled by 'Max bytes-per-second bandwidth' -s #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
-s, --max-bps       Max bytes-per-second bandwidth a TURN session is allowed to 
handle (input and output network streams combined). Anything above that limit 
will be dropped.

What steps will reproduce the problem?
1. start turnserver with paramater "-s 512"
2. start client to download using TCP, as fast as it can be.
3. monitor network usage.

What is the expected output? What do you see instead?
bandwidth is not limited. Limitation on UDP is working fine.

What version of the product are you using? On what operating system?
any would have this issue. 

CODE patch is here

src/apps/relay/ns_ioalib_engine_impl.c

 static int ioa_socket_check_bandwidth(ioa_socket_handle s, size_t sz)
 {
-  if((s->sat == CLIENT_SOCKET ) && s->session) {
+  if((s->sat == CLIENT_SOCKET || s->sat == TCP_CLIENT_DATA_SOCKET || s->sat 
== TCP_RELAY_DATA_SOCKET) && s->session) {
     band_limit_t max_bps = s->session->realm_options.perf_options.max_bps;
     if(max_bps>0) {

Original issue reported on code.google.com by ucu...@gmail.com on 26 Feb 2014 at 6:50

GoogleCodeExporter commented 9 years ago
Thanks ! This problem will be fixed in 3.2.2.9

Original comment by mom040...@gmail.com on 26 Feb 2014 at 7:15

GoogleCodeExporter commented 9 years ago
Fixed in 3.2.2.9

Original comment by mom040...@gmail.com on 3 Mar 2014 at 4:24