Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella Development Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Gnutella Development Discussion For general discussion about Gnutella development.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old November 23rd, 2001
Unregistered
Guest
 
Posts: n/a
Default Hostcache... how do I access them?

How do I get IP addresses from a host cache, which protocoll? Thank you!
Reply With Quote
  #2 (permalink)  
Old November 25th, 2001
Pallando's Avatar
Illuminator
 
Join Date: October 14th, 2001
Location: Germany
Posts: 47
Pallando is flying high
Default

Normaly a gnutella client automaticly connect to a host cacher! Or what do you mean, I think I canīt follow you!
Reply With Quote
  #3 (permalink)  
Old November 25th, 2001
Unregistered
Guest
 
Posts: n/a
Default

Pallando, this is a _developer_ forum... the question is well formulated.

So does anyone know about the theory of hostcaches, how they work, collect IPs and how to connect them in a gnutella client?
Reply With Quote
  #4 (permalink)  
Old November 25th, 2001
Pallando's Avatar
Illuminator
 
Join Date: October 14th, 2001
Location: Germany
Posts: 47
Pallando is flying high
Default

Ups!
Reply With Quote
  #5 (permalink)  
Old November 25th, 2001
Moak's Avatar
Guest
 
Join Date: September 7th, 2001
Location: Europe
Posts: 816
Moak is flying high
Post hostcaches

Okay, I wanna give a short overview on how to use a hostcache.

A Gnutella Hostcache has a single purpose, it will feed you with a bunch of fresh IP-addresses from other Gnutella servants. We allready know that a gnutella servant (YOU) is connected to a few other servants (or to superpeers if available in future). While Gnutella works decentral your client needs a starting point:

1) Hostcaches provide fresh IPs and are a good starting point if you need to find more servants. Connect to an hostcache using the normal Gnutella protocoll [1], the host cache serve the single purpose of responding with pongs to your ping, and disconnecting afterwards.
2) Many servants collect IPs of other servants while they are connected (from those they are connected or from received PONGs) and reuse them on startup.

Note to 1: Don't forget a hostcache will allway drop the connection after serving you the IPs (around 100 pongs usually, but I heared from a hostcache responding with 1000 pongs). There could be also a number of other reasons you are disconnected. Propably the servent is just busy now and can't handle more connections... or pinging you, but you aren't answering with a pong... or you don't share files (see your ping descriptor data) and disconnect because it doesn't help freeloaders. The best idea is to ask many hostcaches [2].
Btw, do not hardcode the gnutella hostcaches as IPs into your code (use hostnames here). Because IPs can change and a DNS resolution does not take a lot of time.... maybe you wanna add the current IP of your hostcaches into your hostslist (see next note).

Note to 2: Collecting IPs of other servants, especially of servants you have been allready connected with, gives you the advantage of a much faster gnutella startup (a few seconds)! Without such a list, you have to query every hostcache and try every IP until you are connected to some servants (or superpeer). Servants may be down or currently accepting no new connections... this try'n'connect could take up to two minutes. Think about collecting and storing IPs into a file (e.g. Xolox stores a few hundred IPs into a hostslist file).

Additional Links:
[1] Gnutella Protocoll http://www.clip2.com/GnutellaProtocol04.pdf
[2] Host caches http://www.gnutellaforums.com/showth...4638#post16845

Actually I'm not a client developer, these information are only as far as I found out from analyzing Xolox, Bearshare and reading various Gnutella articles. It would be nice if some developers of current clients could give us a feedback.

Hope it helps, Moak

Last edited by Moak; January 29th, 2002 at 08:08 PM.
Reply With Quote
  #6 (permalink)  
Old March 18th, 2002
Pferdo
Guest
 
Posts: n/a
Default

????
sorry, i'm a newbie...

if i connect to a hostcache like 'connect1.gnutellanet.com:6346' the server sends a GNU-Header with the Query-Flag and 88 bytes payload... then it cuts the connection.

how can i decode this data to reach the IPs & Ports??

thanx, Pferdo
Reply With Quote
  #7 (permalink)  
Old April 1st, 2002
Unregistered
Guest
 
Posts: n/a
Smile Your question about the 88 byte payload

Hey, I had the same problem with connection to the connect1.gnutellahosts.com caches and getting a query message with an 88 byte payload. I think that this message is used to let BearShare users know if there is an update -- thus, in the method that reads a query, check to see if the last byte is 0 (null), as it should be, if it isn't, raise an exception and handle it in your host caching method by ignoring the message.

I believe you have to ping the host to start getting pongs in reply as the caches actually "attach" to the network and I believe they will route your ping to actual hosts. If you don't do so, the host will drop you and you won't get any pongs.

Hope this helps, like I said, I had the same problem and was just as confounded,

Andrew
Reply With Quote
  #8 (permalink)  
Old April 1st, 2002
Devotee
 
Join Date: March 29th, 2002
Location: Germany
Posts: 21
Pferdo is flying high
Default thx

Thank you for the explanation of this query msg!

soon i started ignoring this msg too and send simply a ping... and it worked

CU
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of IPs from hostcache... damien General Gnutella Development Discussion 8 March 19th, 2003 03:26 AM
HostCache question sylexer General Gnutella Development Discussion 2 January 6th, 2003 06:10 AM
writing a hostcache Unregistered General Gnutella / Gnutella Network Discussion 0 September 29th, 2001 02:44 PM
Hostcache problems again RaaF General Discussion 5 September 26th, 2001 09:10 AM
hostcache for firewall topcat Gnotella (Windows) 0 September 19th, 2000 06:17 AM


All times are GMT -7. The time now is 02:10 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright Đ 2020 Gnutella Forums.
All Rights Reserved.