View Single Post
  #17 (permalink)  
Old January 28th, 2009
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

Great!

You should be able to use sun-jdk (I use it on my Gentoo box):

Code:
sudo apt-get install sun-java6-jdk
The package is in multiverse, though: Ubuntu -- Package Search Results -- sun-java6-jdk


In the Phex code, you can just comment out the avgDailyUptime if clause. Commenting out in Java can be done by writing "/*" before the part and "*/" after the part,for example like this:

Code:
    public boolean isDecentPhexHost()
    {
        if ( !StringUtils.equals( vendor, "PHEX" ) )
        {
            return false;
        }
/*
        if ( avgDailyUptime < 7200 )
        {
            return false;
        }
*/
        if ( !isUltrapeer )
        {
            return false;
        }
        return true;
    }

Besides: What this code does:
* The first if clause checks if the other one is a Phex
* The second checks if it has high uptime (decent client)
* The third checks if it is an ultrapeer

Only if all three are fullfilled, the host is called "decent Phex", and Phex preferences decent Phex'.

By commenting out the second if clause, you preference all Phex ultrapeers. If you'd comment out the second and third, you'd also preference Phex leaves (which doesn't help you get connections and might even render your Phex unable to find Ultrapeers).

All this applies only for the connections your program starts. Incoming connections have no preferencing.
__________________

-> 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.

Last edited by arne_bab; January 28th, 2009 at 01:25 AM.
Reply With Quote