Developers.Code.CNeighboursWithG1: Difference between revisions
Jump to navigation
Jump to search
(Importing page from Tikiwiki) |
m (1 revision) |
(No difference)
|
Latest revision as of 20:07, 20 June 2009
CNeighboursWithG1
After defining the list of neighbours in CNeighboursBase, the first inheriting class adds the ping and pong route caches. On the Gnutella network, ping and pong packets keep connections alive, communicate basic information about hosts, and are somtimes used for custom advanced purposes. Here are the parts of the Shareaza code I've seen so far that deal with them:
- CRouteCache is the ping route cache (whatever that is)
- CPongCache is the pong cache (again, I haven't gotten into that file yet)
- CNeighboursWithG1 adds CRouteCache and CPongCache objects to CNeighbours
- CG1Neighbour::OnPing is the only place that calls Neighbours.OnG1Ping()
- CG1Neighbour::OnPong is the only place that calls Neighbours.OnG1Pong()
- CNeighboursWithG1::OnG1Pong is the only place that calls CG1Neighbour::OnNewPong()
I need to document this part of the code by doing the following:
- Understand the format and meaning of ping and pong packets
- Understand how Gnutella clients exchange and route them on the network
- Comment and document CRouteCache and CPongCache
- Document how ping and pong packets flow through the Shareaza source code, telling the narrative from their perspective, irregardless of what classes and methods they cross through