Developers.Gnutella.Notes.Bootstrapping: Difference between revisions
Jump to navigation
Jump to search
(Importing page from Tikiwiki) |
m (1 revision) |
Latest revision as of 20:09, 20 June 2009
Bootstrapping
This could really be called Connecting.
To connect to the Gnutella network, a servent needs to find and store hosts' addresses. There are four ways by which a servent may get hosts' addresses
And they are:
- Calling a GWebCache. This is a php script that someone has uploaded to their Web server. Gnutella programs running on personal computers call the script to tell it their IP address, and get the IP addresses of programs that have done the same thing recently. This lets Gnutella programs find each other.
- During the handshake, Gnutella programs tell each other some more IP addresses in X-Try and X-Try-Ultrapeers headers.
- There are addresses sprinkled into Pong messages the same way.
- QueryHit messages also have IP addresses in them.
Shareaza keeps a host cache - a part of the program that lists IP addresses on the Internet where Gnutella programs may be running and reachable now. When it queries a GWebCache, reads an X-Try header, or looks in a Pong or QueryHit message, it pulls out the addresses and hands them over to the host cache.