Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Phex (Cross-platform) > Feature Requests & Bug Reports
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

Feature Requests & Bug Reports Is there anything you'd wish to see in Phex, or did you find some bugs?


Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old January 27th, 2009
arne_bab's Avatar
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

Hi ToNneTje,

Quote:
Originally Posted by ToNneTje View Post
"Do you build your Phex from subversion?"

I haven't build anything, i'm not an expert
Since you're using GNU/Linux, you don't need to be

Which distribution do you use?
(you need subversion, everything else should already be in place)
__________________

-> 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
  #12 (permalink)  
Old January 27th, 2009
ToNneTje's Avatar
Gnutella Admirer
 
Join Date: January 24th, 2009
Location: Netherlands
Posts: 69
ToNneTje is flying high
Default

I'm using Ubuntu 8.10.

But even build Phex from subversion sounds difficult to me

(Maybe i must spend some time to learn stuff like that)
Reply With Quote
  #13 (permalink)  
Old January 27th, 2009
arne_bab's Avatar
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

It really isn't hard

You just need to open a terminal and do the following few steps.

First step: Getting subversion (for downloading the code) and maven (to build phex):

Code:
sudo apt-get install subversion maven2
Second step: Getting the phex code:

Code:
svn co https://phex.svn.sourceforge.net/svnroot/phex/phex/trunk phex
Third step: Building and Running Phex:


Code:
cd phex
./build-and-run
That's it, you can now always run the bleeding edge version of Phex via

Code:
svn update ; ./build-and-run


To now change Phex to always prefer Phex, just open the following file from the phex folder in your text editor and change the section I named in the earlier post:

src/main/java/phex/host/CaughtHost.java

And you can run ./build-and-run to run it.

Voilą, your own modified Phex version
__________________

-> 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
  #14 (permalink)  
Old January 27th, 2009
ToNneTje's Avatar
Gnutella Admirer
 
Join Date: January 24th, 2009
Location: Netherlands
Posts: 69
ToNneTje is flying high
Default

Thanks alot, i will try to do this tonight.

Reply With Quote
  #15 (permalink)  
Old January 27th, 2009
arne_bab's Avatar
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

Happy sharing!
__________________

-> 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
  #16 (permalink)  
Old January 27th, 2009
ToNneTje's Avatar
Gnutella Admirer
 
Join Date: January 24th, 2009
Location: Netherlands
Posts: 69
ToNneTje is flying high
Default

@Arne

It works, i can now edit CaughtHost.java

But... do i need to change 3 time False into True ?
Or do i have to delete if ( avgDailyUptime < 7200 ) ?

And Ubuntu has installed OpenJDK after i follow your instructions and now the program isn't look very well.
I was using Sun Java... can i uninstall OpenJDK or is it necessary ?

Thanks.

T.
Reply With Quote
  #17 (permalink)  
Old January 28th, 2009
arne_bab's Avatar
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 12:25 AM.
Reply With Quote
  #18 (permalink)  
Old January 28th, 2009
arne_bab's Avatar
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

PS: I just adapted this thread to turn it into a guide in our development section: http://www.gnutellaforums.com/develo...ntu-linux.html
__________________

-> 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
  #19 (permalink)  
Old July 22nd, 2009
Apprentice
 
Join Date: July 21st, 2009
Posts: 9
ricoil is flying high
Default

Quote:
Originally Posted by arne_bab View Post
All this applies only for the connections your program starts. Incoming connections have no preferencing.
Where must the code be modified in order to introduce preferencing in Incoming connections as well?
Reply With Quote
  #20 (permalink)  
Old July 22nd, 2009
arne_bab's Avatar
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

I think you might have to add a new comparision feature to incoming connections. It will have to decide, if it wants to drop a working connection when it gets a new incoming one, and that code can get quite complicated (including a setting to reserve slots for other vendors to make sure that Phex doesn't isolate itself - or a setting to only grant at most 2/3rd of the slots to a specific vendor or similar to avoid isolation in a single-vendor-island).

I'm not perfectly sure about the right place, but the OIOServer looks fitting: https://phex.svn.sourceforge.net/svn...OIOServer.java

Gregor should know that better...
__________________

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 07:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.