auto-close DC++ when a set amount of data has been transferd

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

fool
Posts: 3
Joined: 2003-04-11 23:15

auto-close DC++ when a set amount of data has been transferd

Post by fool » 2003-04-11 23:27

perhaps it's possible to incorporate an option to set a maximum transfer value

suppose a user sets it to 1024MB, then DC++ automatically closes itself when 1024MB have been transferred
(as usual 0 to disable)

this way, the more unfortunate users who have transfer limits enforced upon themselves by their ISP :evil: can schedule DC++ to run daily without the 'fear' of any repercussions

thank you for your consideration

fool

fool
Posts: 3
Joined: 2003-04-11 23:15

Post by fool » 2003-04-11 23:42

codewise:

- add an extra variable to SettingsManager (e.g. MaxTransfer)
- modify the last lines of

void MainFrame::onAction(TimerManagerListener::Types type, u_int32_t aTick) throw()

add

// there may be a much 'cleaner' way of accomplishing this
if( (SETTING(MAX_DOWNLOAD) > 0) && (Socket::getTotalDown() + Socket::getTotalUp() >= SETTING(MAX_DOWNLOAD) * 1024 * 1024) )
PostMessage(WM_CLOSE);

just before

Socket::resetStats();

- add the appropriate control to one of the option forms

sorry, no code here, I have absolutely no idea how to do this

thank you for your consideration

fool

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Post by GargoyleMT » 2003-04-12 00:13

Well, is the traffic both directions? And per a certain time period (yours is daily, but what about other users)?

I think that upload and download limiting would be a better solution here, unless the user was that concerned about getting files as fast as possible. Certainly being around and available is more beneficial to the DC community, even if transfers have to be capped not to exceed transfer limits.

Of course, dialog is encouraged. :-D

tseyouth
Posts: 2
Joined: 2003-04-12 17:35

Post by tseyouth » 2003-04-12 18:01

my college limits the weekly bandwith to 2.4 GB down and 600MB up. If you want to account for a per week or a per day limit, just convert the per week limit into a per day limit (ie 2.4GB/7 per day). I know thats not perfect but it would prevent us from going over.

Even if there was just a monitor that you can keep on screen or in the status bar that turns red when it gets within a certain threshold would be really useful.

I don't know a whole lot about programming, but this limit could be maintained across sessions if an external file or registry settign is changed after each transfer completes or stops.

Nazo
Posts: 68
Joined: 2003-04-03 19:35

Post by Nazo » 2003-04-15 10:25

Just limit the bandwidth you use and you don't have to worry about such things. I don't just mean as in keep an eye on it at all times, but if DC doesn't already have settings for this, use something external like perhaps netlimiter.

fool
Posts: 3
Joined: 2003-04-11 23:15

Post by fool » 2003-05-10 19:35

point taken...

how about a button that resets the up- & download counters?

Who is online

Users browsing this forum: Google [Bot] and 0 guests