Partial File Sharing

Here is the sub forum used for talking about ideas, implementations and suggestions or typical guidelines.

Further info on extension or the protocol is found at our Wiki
Erty Hackward
Newbie
Posts: 3
Joined: 29 Sep 2009, 06:00

Partial File Sharing

Post by Erty Hackward » 29 Sep 2009, 07:57

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.

darkKlor
Senior Member
Posts: 100
Joined: 30 Dec 2008, 14:59

Re: Partial File Sharing

Post by darkKlor » 29 Sep 2009, 08:05

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.

Erty Hackward
Newbie
Posts: 3
Joined: 29 Sep 2009, 06:00

Re: Partial File Sharing

Post by Erty Hackward » 29 Sep 2009, 08:26

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?

darkKlor
Senior Member
Posts: 100
Joined: 30 Dec 2008, 14:59

Re: Partial File Sharing

Post by darkKlor » 29 Sep 2009, 08:33

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.

Erty Hackward
Newbie
Posts: 3
Joined: 29 Sep 2009, 06:00

Re: Partial File Sharing

Post by Erty Hackward » 29 Sep 2009, 08:40

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 =)

Pietry
Senior Member
Posts: 328
Joined: 04 Dec 2007, 07:25
Location: Bucharest
Contact:

Re: Partial File Sharing

Post by Pietry » 29 Sep 2009, 08:46

ADC protocol is well documented, but I can not find anything about file sharing in nmdc protocol.
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.
Just someone

darkKlor
Senior Member
Posts: 100
Joined: 30 Dec 2008, 14:59

Re: Partial File Sharing

Post by darkKlor » 29 Sep 2009, 08:47

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.

en_dator
Member
Posts: 72
Joined: 01 Apr 2008, 19:24

Re: Partial File Sharing

Post by en_dator » 29 Sep 2009, 21:54

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.

Pietry
Senior Member
Posts: 328
Joined: 04 Dec 2007, 07:25
Location: Bucharest
Contact:

Re: Partial File Sharing

Post by Pietry » 30 Sep 2009, 10:16

You can try wireshark to capture and analyse the protocol
Just someone

Toast

Re: Partial File Sharing

Post by Toast » 30 Sep 2009, 10:51

Or BM could tell us how it works :)

Locked