![]() |
Hi ToNneTje, Quote:
Which distribution do you use? (you need subversion, everything else should already be in place) |
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) |
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 Code: svn co https://phex.svn.sourceforge.net/svnroot/phex/phex/trunk phex Code: cd phex 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 :) |
Thanks alot, i will try to do this tonight. :xeri_ok1ani: |
Happy sharing! |
@Arne It works, i can now edit CaughtHost.java :xeri_ok1ani: 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. |
Great! You should be able to use sun-jdk (I use it on my Gentoo box): Code: sudo apt-get install 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() 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. |
PS: I just adapted this thread to turn it into a guide in our development section: http://www.gnutellaforums.com/develo...ntu-linux.html |
Quote:
|
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... |
All times are GMT -7. The time now is 10:08 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2020 Gnutella Forums.
All Rights Reserved.