Upload queue
Moderator: Moderators
-
- Posts: 21
- Joined: 2003-10-11 08:59
Upload queue
I've developed a simple new DC++ feature.
And I hope it will be considered useful.
Arnet could insert it in a future version of DC++
Basically there's a window like the search spy window.
This window receives events fired from UploadManager::prepareFile
when all upload slots are taken.
The windows lists the number of attemps, the user name and the file name of a rejected upload because of "slots full".
So here the user can see who's trying to download something from you and what he's requesting..
The user so can "grant slot" whenever he decides to do so.
Let me know what do you think about.
Thanks.
And I hope it will be considered useful.
Arnet could insert it in a future version of DC++
Basically there's a window like the search spy window.
This window receives events fired from UploadManager::prepareFile
when all upload slots are taken.
The windows lists the number of attemps, the user name and the file name of a rejected upload because of "slots full".
So here the user can see who's trying to download something from you and what he's requesting..
The user so can "grant slot" whenever he decides to do so.
Let me know what do you think about.
Thanks.
This will not be added to DC++. Listing which file a person wants isn't possible.
http://sourceforge.net/tracker/index.ph ... tid=527768
http://sourceforge.net/tracker/index.ph ... tid=527768
-
- Posts: 21
- Joined: 2003-10-11 08:59
I already saw that but arnet said "not possible"
what is not possible?
and why?
The feature is useful for this reason:
Imagine you're sharing a lot of MP3s (6mb each) and some DVD's ISOS(4.3gb each) if you have 5 slots you want to GRANT an mp3 upload without let the uploader wait 20 hours (at least)...
So what's the reason for the Reject?
what is not possible?
and why?
The feature is useful for this reason:
Imagine you're sharing a lot of MP3s (6mb each) and some DVD's ISOS(4.3gb each) if you have 5 slots you want to GRANT an mp3 upload without let the uploader wait 20 hours (at least)...
So what's the reason for the Reject?
Basically, after a downloader asks for a connection, the uploader replies with "No Slots available" before the downloader specifies which file it wants. The transaction between the two is then over. To change this behaviour would add bloat, and I personally don't think it's worth it. I'm pretty sure that's why it is not possible.
BTW, if you're going to shorten arnetheduck's nickname, arne is more appropriate.
BTW, if you're going to shorten arnetheduck's nickname, arne is more appropriate.
-
- Posts: 21
- Joined: 2003-10-11 08:59
this is not true
Code: Select all
bool UploadManager::prepareFile(UserConnection* aSource, const string& aFile, int64_t aResume) {
[...]
try {
file = ShareManager::getInstance()->translateFileName(aFile); <-----------------------here you know what's the file name
dcdebug("Requested file: %s\n", file.c_str()); //added by me only for debug purposes
} catch(const ShareException&) {
aSource->error("File Not Available");
return false;
}
if( (!aSource->isSet(UserConnection::FLAG_HASSLOT)) &&
(getFreeSlots()<=0) &&
(ui == reservedSlots.end()) &&
(!aSource->getUser()->getFavoriteGrantSlot()))
{
dcdebug("Average speed: %s/s\n", Util::formatBytes(UploadManager::getInstance()->getAverageSpeed()).c_str());
if( ((getLastAutoGrant() + 30*1000) > GET_TICK()) || (SETTING(MIN_UPLOAD_SPEED) == 0) || ( (SETTING(MIN_UPLOAD_SPEED)*1024) < UploadManager::getInstance()->getAverageSpeed() ) ) {
if( !(smallfile || userlist) ||
!(aSource->isSet(UserConnection::FLAG_HASEXTRASLOT) || (getFreeExtraSlots() > 0) || (aSource->getUser()->isSet(User::OP)) ) ||
!(aSource->getUser()->isSet(User::DCPLUSPLUS) || aSource->isSet(UserConnection::FLAG_SUPPORTS_MINISLOTS))
)
{
cs.leave();
fire (event to signal the attempted upload) //modify this
aSource->maxedOut(); <--------------here you give the NO SLOTS message
removeConnection(aSource);
return false;
}
}
setLastAutoGrant(GET_TICK());
}
-
- Posts: 21
- Joined: 2003-10-11 08:59
this is an extract from the debug window.
Code: Select all
threadConnect()
ConnectionManager::onMyNick 01D10538, Sparafucile
ConnectionManager::onKey, leaving to uploadmanager
Requested file: E:\Immagini\Mandrake92-cd2-ext.i586.iso
No free upload slots adding to upload queue
Already present in the upload queue incrementing retry counter (4)
-
- Posts: 21
- Joined: 2003-10-11 08:59
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
-
- Posts: 21
- Joined: 2003-10-11 08:59
-
- Posts: 21
- Joined: 2003-10-11 08:59