PDA

View Full Version : Multiple Sources


joni.loky
April 29th, 2008, 02:12 PM
Hi, I recently read "The Gnutella Protocol Specification v0.4. Document Revision 1.2" and i'm not really sure of how you can achieve multiple sources downloads. If two different servents have the same file and they each generate their own File Index to send as a Query Hit. How can I be sure that I can download different pieces of the same file from those two servents?

Aaron.Walkhouse
April 29th, 2008, 07:00 PM
Request by the hash using a URN identifier.

joni.loky
April 30th, 2008, 05:18 PM
Hi! Thnx 4 the help but, can you tell me which version of the protocol should I implement should I make my own gnutella client? Which version of the protocol is the current standard? Because there's nothing about hash or URN in the version I read...

Aaron.Walkhouse
April 30th, 2008, 07:18 PM
Oh, right. 0.4 has been out of use for a long time. Whoops! http://www3.telus.net/Aaron_Walkhouse/tongue3.gif
The Wiki is here: http://wiki.limewire.org/index.php?title=GDF

Since I can't see it with a quick glance in there, here's an example of requesting a file by it's hash.
GET /uri-res/N2R?urn:sha1:PS4URQCO7F5OR3MFCQRLRYUD75GRZNRD HTTP/1.1\r\n
Host: xxx.xxx.xxx.xxx:xxxx\r\n [the remote address:port]
User-Agent: [your software's full name and version number goes here]\r\n
Range: bytes=15810102-15990783\r\n
X-Gnutella-Content-URN: urn:sha1:PS4URQCO7F5OR3MFCQRLRYUD75GRZNRD\r\n
X-Connection-Type: Other\r\n
Content-Disposition: inline; filename="911 - Loose Change 2nd Edition DVDRip XviD.avi"\r\n
X-Features: browse/1.0, queue/0.1, fwalt/0.1\r\n
X-Node: xxx.xxx.xxx.xxx:xxxx\r\n [your own address:port]
X-Queue: 0.1\r\n
\r\n

Aaron.Walkhouse
April 30th, 2008, 07:30 PM
Once you get used to that, look up:

Partial File Sharing Protocol (PFSP)
and
Tree Hash EXchange format (THEX)

You'll like what you find there. ;]

Join The_GDF too: http://groups.yahoo.com/group/the_gdf/