View Single Post
  #9 (permalink)  
Old March 5th, 2010
arne_bab's Avatar
arne_bab arne_bab is offline
Draketo, small dragon.
 
Join Date: May 31st, 2002
Location: Heidelberg, Germany
Posts: 1,881
arne_bab is a great assister to others; your light through the dark tunnel
Default

Quote:
Originally Posted by hustnn
But I don't mean how to choose the node to connect from the host lists.I mean when we collect hosts from udp host cache,x-try,x-ultrapeer,pong or query hits ways,then they contruct the local host cache list,then we how to maintain it,such as
"how to check th host in the list is still active?",
"how ofter to check?",
"when do I need to collect new hosts to update the local cache?"
You'll get so mand new hosts via pongs that you won't need to ask them if they are still alive. You just keep statistics of what you naturally see.

And that's what the code I linked to in phex does: it sorts the newcoming hosts, and phex then just keeps the top 1000 addresses.

That means, you have to sort every host into your local hostcatcher and let the worst ones drop out.
__________________

-> put this banner into your own signature! <-
--
Erst im Spiel lebt der Mensch.
Nur ludantaj homoj vivas.
GnuFU.net - Gnutella For Users
Draketo.de - Shortstories, Poems, Music and strange Ideas.
Reply With Quote