Partial File Sharing
-
- Newbie
- Posts: 3
- Joined: 29 Sep 2009, 06:00
Partial File Sharing
Does anybody knows how partial file sharing works both on nmdc and adc?
I'm C#/c++ developer. I want to add support for partial file sharing in my client.
I'm C#/c++ developer. I want to add support for partial file sharing in my client.
-
- Senior Member
- Posts: 100
- Joined: 30 Dec 2008, 14:59
Re: Partial File Sharing
As in, the remote user requests, say, bytes 1000 to 2000 of a file?
If the request is in the form of a TTH, then the TTH would refer directly to the piece of the file that is being requested, so you just do a lookup in your hash index of where the TTH refers to, and send that segment.
As for actually requesting segments, the client sends out a SCH request for files (using the TTH as the search parameter), and when other clients return a RES acknowledging they have the file, the client connects to them and makes a request for a segment it requires.
If the request is in the form of a TTH, then the TTH would refer directly to the piece of the file that is being requested, so you just do a lookup in your hash index of where the TTH refers to, and send that segment.
As for actually requesting segments, the client sends out a SCH request for files (using the TTH as the search parameter), and when other clients return a RES acknowledging they have the file, the client connects to them and makes a request for a segment it requires.
-
- Newbie
- Posts: 3
- Joined: 29 Sep 2009, 06:00
Re: Partial File Sharing
In other words there is no difference between users who downloading this file and who has it in share? Should I disconnect user if I don't have segment yet?
-
- Senior Member
- Posts: 100
- Joined: 30 Dec 2008, 14:59
Re: Partial File Sharing
No need to force a disconnect, but for ADC, STA error code 52 "File Part Not Available" would seem an appropriate thing to send them. I'm not sure about NMDC.
I'm not sure what your first sentence is trying to say, sorry.
I'm not sure what your first sentence is trying to say, sorry.
-
- Newbie
- Posts: 3
- Joined: 29 Sep 2009, 06:00
Re: Partial File Sharing
I want to support partial file sharing like in strongDC. ADC protocol is well documented, but I can not find anything about file sharing in nmdc protocol. I'll try to watch in StrongDC sources.
darkKlor, thank you =)
darkKlor, thank you =)
-
- Senior Member
- Posts: 328
- Joined: 04 Dec 2007, 07:25
- Location: Bucharest
- Contact:
Re: Partial File Sharing
This is because ADCPortal mainly focuses on ADC development, people around here aren't too much resourceful on nmdc, and I can say there is no specification for nmdc. However, we are glad if we can provide help on your problem at least on the adc side. Perhaps some other developers can give more hints on this issue.ADC protocol is well documented, but I can not find anything about file sharing in nmdc protocol.
Just someone
-
- Senior Member
- Posts: 100
- Joined: 30 Dec 2008, 14:59
Re: Partial File Sharing
NMDC isn't really documented at all. It was reverse engineered from the beginning.
ADC is it's successor, and was developed in the community, hence the documentation.
ADC is it's successor, and was developed in the community, hence the documentation.
-
- Member
- Posts: 72
- Joined: 01 Apr 2008, 19:24
Re: Partial File Sharing
and I believe sdc (and clones) is using ADCGET on nmdc hubs as well but looking in the sources (or setting a client up for testing ) will show you how its done.
-
- Senior Member
- Posts: 328
- Joined: 04 Dec 2007, 07:25
- Location: Bucharest
- Contact: