Re: [twsocket] Throttling for THttpConnection

2006-01-15 Thread Francois PIETTE
 Have you seen the code for bandwidth limitation ? It exists since a few
 months and works with a compile time option.
 
 Great notice! :o
 
 but where is it?

In HttpProt.pas, search for UseBandwidthControl.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling for THttpConnection

2006-01-15 Thread Francois PIETTE
 Would it be feasible if I added one timer per xxx/ 
 number of server connections as the way you did?

Yes it is.

--
[EMAIL PROTECTED]
http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling for THttpConnection

2006-01-15 Thread Fastream Technologies
Thank you. If you use the code perhaps you ucan answer: is it possible to 
apply separate speed limits depending on username and whether the action is 
download or upload?

Best Regards,

SZ

- Original Message - 
From: Dan [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Sunday, January 15, 2006 4:06 PM
Subject: Re: [twsocket] Throttling for THttpConnection


 http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip has 
 some
 example throttling code.  Only uses one timer and throttles all your
 connections to one limit.  No sleeping involved.

 Dan

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, January 14, 2006 7:47 PM
 Subject: [twsocket] Throttling for THttpConnection


 Hello,

 When I run 32 THttpConnection's in a single worker thread, I cannot use
 the
 throttling with the Sleep() command like in one-thread/connection design
 as
 the sleep call blocks the other connections as well since they are in the
 same thread context. I know that there is a limitation for number of
 timers
 per process so here is what I tried:

 - created one timer per thread
 - paused connections in Sleep place
 - resumed them after the calculated ms in timer

 BUT

 - since the timer runs every 20-50 ms (both does the same result), the
 sleep
 period cannot be less than that! I get inconsistent speed results (for
 example, for a 100kBps, I get a fluctuating value between 89-102kBps).
 Does
 anybody know a good solution for this problem?

 Best Regards,

 SZ

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be


 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling for THttpConnection

2006-01-15 Thread Dan
Yes I use it, I programmed it :) I use it in XanTorrent, a Bittorrent client 
I havent worked on for a long time :-/
You can throttle to as many limits as you like, but each limit uses a new 
TTimer.
You create as many TThrottlers as you like and set their limits, then you 
can assign the throttler to multiple sockets and they will share that limit.

Dan

- Original Message - 
From: Fastream Technologies [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Sunday, January 15, 2006 2:33 PM
Subject: Re: [twsocket] Throttling for THttpConnection


 Thank you. If you use the code perhaps you ucan answer: is it possible to
 apply separate speed limits depending on username and whether the action 
 is
 download or upload?

 Best Regards,

 SZ

 - Original Message - 
 From: Dan [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, January 15, 2006 4:06 PM
 Subject: Re: [twsocket] Throttling for THttpConnection


 http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip has
 some
 example throttling code.  Only uses one timer and throttles all your
 connections to one limit.  No sleeping involved.

 Dan

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, January 14, 2006 7:47 PM
 Subject: [twsocket] Throttling for THttpConnection


 Hello,

 When I run 32 THttpConnection's in a single worker thread, I cannot use
 the
 throttling with the Sleep() command like in one-thread/connection design
 as
 the sleep call blocks the other connections as well since they are in 
 the
 same thread context. I know that there is a limitation for number of
 timers
 per process so here is what I tried:

 - created one timer per thread
 - paused connections in Sleep place
 - resumed them after the calculated ms in timer

 BUT

 - since the timer runs every 20-50 ms (both does the same result), the
 sleep
 period cannot be less than that! I get inconsistent speed results (for
 example, for a 100kBps, I get a fluctuating value between 89-102kBps).
 Does
 anybody know a good solution for this problem?

 Best Regards,

 SZ

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be


 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling for THttpConnection

2006-01-14 Thread Francois PIETTE
Have you seen the code for bandwidth limitation ? It exists since a few 
months and works with a compile time option.

--
[EMAIL PROTECTED]
http://www.overbyte.be

- Original Message - 
From: Fastream Technologies [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Saturday, January 14, 2006 8:47 PM
Subject: [twsocket] Throttling for THttpConnection


 Hello,

 When I run 32 THttpConnection's in a single worker thread, I cannot use 
 the
 throttling with the Sleep() command like in one-thread/connection design 
 as
 the sleep call blocks the other connections as well since they are in the
 same thread context. I know that there is a limitation for number of 
 timers
 per process so here is what I tried:

 - created one timer per thread
 - paused connections in Sleep place
 - resumed them after the calculated ms in timer

 BUT

 - since the timer runs every 20-50 ms (both does the same result), the 
 sleep
 period cannot be less than that! I get inconsistent speed results (for
 example, for a 100kBps, I get a fluctuating value between 89-102kBps). 
 Does
 anybody know a good solution for this problem?

 Best Regards,

 SZ

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling for THttpConnection

2006-01-14 Thread David A. G.
 Have you seen the code for bandwidth limitation ? It exists since a few
 months and works with a compile time option.

Great notice! :o

but where is it?

thanks,
David


- Original Message - 
From: Francois PIETTE [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Saturday, January 14, 2006 5:24 PM
Subject: Re: [twsocket] Throttling for THttpConnection


 Have you seen the code for bandwidth limitation ? It exists since a few
 months and works with a compile time option.

 --
 [EMAIL PROTECTED]
 http://www.overbyte.be

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, January 14, 2006 8:47 PM
 Subject: [twsocket] Throttling for THttpConnection


 Hello,

 When I run 32 THttpConnection's in a single worker thread, I cannot use
 the
 throttling with the Sleep() command like in one-thread/connection design
 as
 the sleep call blocks the other connections as well since they are in the
 same thread context. I know that there is a limitation for number of
 timers
 per process so here is what I tried:

 - created one timer per thread
 - paused connections in Sleep place
 - resumed them after the calculated ms in timer

 BUT

 - since the timer runs every 20-50 ms (both does the same result), the
 sleep
 period cannot be less than that! I get inconsistent speed results (for
 example, for a 100kBps, I get a fluctuating value between 89-102kBps).
 Does
 anybody know a good solution for this problem?

 Best Regards,

 SZ

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be