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: Tue Sep 29, 2009 6:00 am

Partial File Sharing

Post by Erty Hackward » Tue Sep 29, 2009 7:57 am

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: Tue Dec 30, 2008 2:59 pm

Re: Partial File Sharing

Post by darkKlor » Tue Sep 29, 2009 8:05 am

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: Tue Sep 29, 2009 6:00 am

Re: Partial File Sharing

Post by Erty Hackward » Tue Sep 29, 2009 8:26 am

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: Tue Dec 30, 2008 2:59 pm

Re: Partial File Sharing

Post by darkKlor » Tue Sep 29, 2009 8:33 am

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: Tue Sep 29, 2009 6:00 am

Re: Partial File Sharing

Post by Erty Hackward » Tue Sep 29, 2009 8:40 am

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: Tue Dec 04, 2007 7:25 am
Location: Bucharest

Re: Partial File Sharing

Post by Pietry » Tue Sep 29, 2009 8:46 am

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: Tue Dec 30, 2008 2:59 pm

Re: Partial File Sharing

Post by darkKlor » Tue Sep 29, 2009 8:47 am

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: Tue Apr 01, 2008 7:24 pm

Re: Partial File Sharing

Post by en_dator » Tue Sep 29, 2009 9:54 pm

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: Tue Dec 04, 2007 7:25 am
Location: Bucharest

Re: Partial File Sharing

Post by Pietry » Wed Sep 30, 2009 10:16 am

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

Toast

Re: Partial File Sharing

Post by Toast » Wed Sep 30, 2009 10:51 am

Or BM could tell us how it works :)

Who is online

Users browsing this forum: Google (Crawler) and 0 guests