This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Windows Support

Tags: None
(comma "," separated)
Zues
Registered Member
Posts
25
Karma
0

Thu Mar 20, 2008 4:21 am
Do you have a list of the changes you've made so far?
User avatar
Brandon
Moderator
Posts
72
Karma
0
OS

Thu Mar 20, 2008 11:37 am
well more or less:
  • load the winsock dll
  • added a function that emulates poll() on windows
  • disabled log rotation
  • changed some function that doesn't exist/aren't similar on windows

btw it's not possible to set ToS on windows 2k/xp/2k3 http://support.microsoft.com/kb/248611 is this needed by ktorrent? it can be activated by changing a regkey anyway
George
Moderator
Posts
5421
Karma
1

Thu Mar 20, 2008 1:57 pm
Brandon wrote:well more or less:
  • load the winsock dll
  • added a function that emulates poll() on windows
  • disabled log rotation
  • changed some function that doesn't exist/aren't similar on windows


Could you send me a patch with the current status ? So I can try it out myself.

btw it's not possible to set ToS on windows 2k/xp/2k3 http://support.microsoft.com/kb/248611 is this needed by ktorrent? it can be activated by changing a regkey anyway


It's not really that important. It was only put in for people having some sort of QOS setup on their box or LAN, I do not think there are many people using it.
Zues
Registered Member
Posts
25
Karma
0

Sat Mar 22, 2008 6:43 am
I think it would be fitting to post a torrent, Id like to play around with it on XP also.
User avatar
Brandon
Moderator
Posts
72
Karma
0
OS

Wed Mar 26, 2008 10:59 pm
I've an issue with Cache::mappedModeAllowed(), on windows there is no limit to file descriptor, except resources, rlimit is implemented in kdewin32 and it does nothing and MaxOpenFiles always returns 1, so why MaxOpenFiles() - bt::PeerManager::getTotalConnections() should be < 100? to allow mmap?
George
Moderator
Posts
5421
Karma
1

Thu Mar 27, 2008 9:54 am
Brandon wrote:I've an issue with Cache::mappedModeAllowed(), on windows there is no limit to file descriptor, except resources, rlimit is implemented in kdewin32 and it does nothing and MaxOpenFiles always returns 1, so why MaxOpenFiles() - bt::PeerManager::getTotalConnections() should be < 100? to allow mmap?


The problem with mmap is that you have to keep the file open, so people ran into trouble hitting the system limits when they had torrents with a lot of files (to many files open errors). So we added this to prevent this from happening by using buffered mode only when we you are approaching system limits.

Seeing that windows has no limits, I suggest you let this function always return true on windows.
User avatar
Brandon
Moderator
Posts
72
Karma
0
OS

Thu Mar 27, 2008 12:30 pm
ok thanks :D
Zues
Registered Member
Posts
25
Karma
0

Sat Mar 29, 2008 6:49 am
How much have you gotten to work so far?
User avatar
Brandon
Moderator
Posts
72
Karma
0
OS

Sat Mar 29, 2008 12:35 pm
downloading a single file in mmaped mode works, i still have problem with buffered mode and multiple files torrent. Upload seems to work too but I don't know if it uploads good or corrupted chunks :D
Zues
Registered Member
Posts
25
Karma
0

Mon Mar 31, 2008 10:08 pm
Thats kind of weird, if one file downloads, it should work for multiple files too.
User avatar
Brandon
Moderator
Posts
72
Karma
0
OS

Mon Mar 31, 2008 11:05 pm
assistant wrote:Thats kind of weird, if one file downloads, it should work for multiple files too.

i've tested it a bit more and i think it dependes on which torrent is(maybe size), i have a multiple file torrent that is always corrupted, while others are half good and half corrupted
George
Moderator
Posts
5421
Karma
1

Tue Apr 01, 2008 10:38 am
Brandon wrote:
assistant wrote:Thats kind of weird, if one file downloads, it should work for multiple files too.

i've tested it a bit more and i think it dependes on which torrent is(maybe size), i have a multiple file torrent that is always corrupted, while others are half good and half corrupted


The calculation on which parts of which file to load or save for a chunk, should be portable.

However mmap under linux requires that when you mmap a part of a file, the offset must be a multiple of the page size. Maybe this is different under windows ?
User avatar
Brandon
Moderator
Posts
72
Karma
0
OS

Tue Apr 01, 2008 12:07 pm
George wrote:
Brandon wrote:
assistant wrote:Thats kind of weird, if one file downloads, it should work for multiple files too.

i've tested it a bit more and i think it dependes on which torrent is(maybe size), i have a multiple file torrent that is always corrupted, while others are half good and half corrupted


The calculation on which parts of which file to load or save for a chunk, should be portable.

However mmap under linux requires that when you mmap a part of a file, the offset must be a multiple of the page size. Maybe this is different under windows ?

yeah i've made that thing a bit different on windows following this example http://msdn2.microsoft.com/en-us/library/aa366548, but i'm not sure if it's the real problem, because the corrupted file is saved in the same way using both buffered and mmaped mode, i've also compared the corrupted file with the good one using an hex editor, the first part is good then the corrupted file have a null byte so the second part have an higher offset in the corrupted file, the end of the file looks like the same in both, but the corrupted one as a much higher offset(290 hex)
George
Moderator
Posts
5421
Karma
1

Wed Apr 02, 2008 7:26 am
So there is some sort of bug in the offset calculation.

Could you send me your latest code ? Maybe I can figure it out.
Zues
Registered Member
Posts
25
Karma
0

Wed Apr 09, 2008 6:19 pm
Is the newest kTorrent build based completely off of KDE4?

Because I read somewhere that when most of the apps were ported to KDE4 that direct porting to other os's would be very easy.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell