ufairiya / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Add a way to pause the "streaming" withouth closing the connection #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

I think it should be a good idea to insert a 'pause' method to block
temporarily a streaming (to all the hosts connected or to a single
specified host).

Original issue reported on code.google.com by marcu...@gmail.com on 13 Jul 2009 at 8:10

GoogleCodeExporter commented 9 years ago
Could you explain in a bit more detail, why do you need such functionality.
Also, the prototype of the new call, and how it will be used.

Original comment by valenok on 19 Jul 2009 at 9:52

GoogleCodeExporter commented 9 years ago
I need this functionality when I need to share files with others, and not web 
files
or similar. For example my server could 'block' temporarily the upload with one
client to give another client the possibility to download faster.
The prototype, uhm...
I'll think about it; for now maybe you could give me other suggestions to 
"support"
this functionality, if you know some of them.

Bye :)

Original comment by marcu...@gmail.com on 20 Jul 2009 at 1:41

GoogleCodeExporter commented 9 years ago
You want throttling functionality, I believe.
An option that does something like this:
mg_set_option(ctx, "bw", "0.0.0.0/0:10KBps,192.0.0.0/8:2MBps,10.0.0.0/8:0");
Which translates to:
  give adresses from 10/8 infinite bandwidth
  from 192/8 - 2MBps 
  the rest get 10KBps

Original comment by valenok on 22 Jul 2009 at 7:49

GoogleCodeExporter commented 9 years ago
Can you set this option more than one time?
For example:
mg_set_option(ctx, "bw", "0.0.0.0:10KBps");
/* ... some code ... */
mg_set_option(ctx, "bw", "192.0.0.0:2MBps");

does this call override the previous "bw" option so that 0.0.0.0 takes the 
default
bandwidth?

Bye!

Original comment by marcu...@gmail.com on 23 Jul 2009 at 10:04

GoogleCodeExporter commented 9 years ago
There is no such option yet.
I am just making it up :-)
But in Mongoose, setting an option means overriding the previous value.

Original comment by valenok on 23 Jul 2009 at 10:07

GoogleCodeExporter commented 9 years ago
So at the moment I should "store" them in a string and add/remove "IPs:Bw" comma
separated; well :)

thank you!

Original comment by marcu...@gmail.com on 23 Jul 2009 at 2:13

GoogleCodeExporter commented 9 years ago
Ok, I didn't read your answer well :P 
I thought it was already implemented and you were developing the possibility to 
not
override the options.

So I'll wait. 
Thank you!

Original comment by marcu...@gmail.com on 25 Jul 2009 at 5:24

GoogleCodeExporter commented 9 years ago
I think bandwidth limiting is a good feature, but:
1. It is not on the top of the priority list
2. I don't have much free time these days

So you may wait for a long time - I am talking about months here. How tolerant 
are you?

Original comment by valenok on 25 Jul 2009 at 5:41

GoogleCodeExporter commented 9 years ago
Don't worry. 
Take your time :)

You've already done a perfect job with this library, so don't worry ;)

Thank you ;)

Original comment by marcu...@gmail.com on 25 Jul 2009 at 8:11

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 7 Sep 2010 at 8:42