Developers.FiguringOutCNeighbours: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
===Figuring out CNeighbours===
{{do not translate}}
= Figuring out CNeighbours =
The next classes I'm going to explore are part of a daunting column of inheritance:
The next classes I'm going to explore are part of a daunting column of inheritance:


Line 6: Line 7:
The classes are:
The classes are:


[[Developers.Code.CNeighboursBase]]
* [[Developers.Code.CNeighboursBase]]
[[Developers.Code.CNeighboursWithG1]]
* [[Developers.Code.CNeighboursWithG1]]
[[Developers.Code.CNeighboursWithG2]]
* [[Developers.Code.CNeighboursWithG2]]
[[Developers.Code.CNeighboursWithED2K]]
* [[Developers.Code.CNeighboursWithED2K]]
[[Developers.Code.CNeighboursWithRouting]]
* [[Developers.Code.CNeighboursWithRouting]]
[[Developers.Code.CNeighboursWithConnect]]
* [[Developers.Code.CNeighboursWithConnect]]
[[Developers.Code.CNeighbours]]
* [[Developers.Code.CNeighbours]]


Developer ''ten9'' has said that Shareaza never makes an object from ''CNeighboursWithG1'' or ''CNeighboursWithRouting''. The inheritance column is just about building up features and functionality for ''CNeighbours'', from which objects are made. It's weird that Gnutella, Gnutella2, and eDonkey2000 are all in the chain. I think that Mike also has questioned this design.
Developer ''ten9'' has said that Shareaza never makes an object from ''CNeighboursWithG1'' or ''CNeighboursWithRouting''. The inheritance column is just about building up features and functionality for ''CNeighbours'', from which objects are made. It's weird that Gnutella, Gnutella2, and eDonkey2000 are all in the chain. I think that Mike also has questioned this design.
Line 19: Line 20:


'''CNeighboursBase'''
'''CNeighboursBase'''
short
 
member variables like ''m_nLeafCount'' and ''m_nBandwidthIn''
member variables like ''m_nLeafCount'' and ''m_nBandwidthIn''
methods like ''Connect'', ''Close'', ''OnRun'', ''Add'' and ''Remove''
methods like ''Connect'', ''Close'', ''OnRun'', ''Add'' and ''Remove''
Line 25: Line 26:


'''CNeighboursWithG1'''
'''CNeighboursWithG1'''
very short
 
adds member variables like ''m_pPongCache''
adds member variables like ''m_pPongCache''
adds methods like ''OnG1Ping'' and ''OnG1Pong''
adds methods like ''OnG1Ping'' and ''OnG1Pong''
Line 31: Line 32:


'''CNeighboursWithG2'''
'''CNeighboursWithG2'''
short
 
doesn't add any member variables
doesn't add any member variables
adds methods like ''CreateQueryWeb'' and ''GetRandomHub''
adds methods like ''CreateQueryWeb'' and ''GetRandomHub''
Line 37: Line 38:


'''CNeighboursWithED2K'''
'''CNeighboursWithED2K'''
very short
 
adds member variables like ''m_tEDSources''
adds member variables like ''m_tEDSources''
adds methods like ''SendDonkeyDownload'' and ''PushDonkey''
adds methods like ''SendDonkeyDownload'' and ''PushDonkey''
Line 43: Line 44:


'''CNeighboursWithRouting'''
'''CNeighboursWithRouting'''
short
 
doesn't add any member variables
doesn't add any member variables
adds just two methods, ''Broadcast'' and ''RouteQuery''
adds just two methods, ''Broadcast'' and ''RouteQuery''
Line 49: Line 50:


'''CNeighboursWithConnect'''
'''CNeighboursWithConnect'''
long
 
doesn't add any member variables
doesn't add any member variables
adds methods like ''IsG1Leaf'' and ''IsG1UltrapeerCapable''
adds methods like ''IsG1Leaf'' and ''IsG1UltrapeerCapable''
Line 55: Line 56:


'''CNeighbours'''
'''CNeighbours'''
very short
 
doesn't add any member variables
doesn't add any member variables
defines virtual methods like ''Connect'', ''Close'' and ''OnRun''
defines virtual methods like ''Connect'', ''Close'' and ''OnRun''
almost no code here, this seems to just be about how the inheritance works
almost no code here, this seems to just be about how the inheritance works
{{Navigation|Developers}}

Latest revision as of 13:25, 27 October 2010

  Translation

Do not translate this page into other languages. It is either low priority, too specific or incomplete.

e

Figuring out CNeighbours

The next classes I'm going to explore are part of a daunting column of inheritance:

File:With.gif

The classes are:

Developer ten9 has said that Shareaza never makes an object from CNeighboursWithG1 or CNeighboursWithRouting. The inheritance column is just about building up features and functionality for CNeighbours, from which objects are made. It's weird that Gnutella, Gnutella2, and eDonkey2000 are all in the chain. I think that Mike also has questioned this design.

Here's my initial survey of these classes:

CNeighboursBase

member variables like m_nLeafCount and m_nBandwidthIn methods like Connect, Close, OnRun, Add and Remove seems to be keeping a list of computers we are connected to

CNeighboursWithG1

adds member variables like m_pPongCache adds methods like OnG1Ping and OnG1Pong seems to be searching the list of connected computers to deal with Gnutella ping and pong packets

CNeighboursWithG2

doesn't add any member variables adds methods like CreateQueryWeb and GetRandomHub seems to be searching the list of connected computers to deal with Gnutella 2 packets

CNeighboursWithED2K

adds member variables like m_tEDSources adds methods like SendDonkeyDownload and PushDonkey seems to be searching the connected computer list, and then doing a task with the found computer

CNeighboursWithRouting

doesn't add any member variables adds just two methods, Broadcast and RouteQuery this must be where the program does packet routing

CNeighboursWithConnect

doesn't add any member variables adds methods like IsG1Leaf and IsG1UltrapeerCapable lots of code about hubs and leaves

CNeighbours

doesn't add any member variables defines virtual methods like Connect, Close and OnRun almost no code here, this seems to just be about how the inheritance works



Navigation:     ShareazaWiki > Developers > Developers.FiguringOutCNeighbours