View Single Post
  #2 (permalink)  
Old May 24th, 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

Hi codditor,

Firstoff: Welcome to the Phex forums!

From your questions I can only answer 1 and 3:

1) Yes: http://www.phex.org/wiki/index.php/A...headless.29.3F

Code:
java -Xmx512m -Djava.awt.headless=true -jar phex.jar
It still requires an X-server though, since Java depends on some of its functions.

Also you can't control it from there: You need to start it in GUI mode to setup your share downloads and preferences, then you can quit and restart in headless mode (we don't yet have commandline control).

3) Yes - just look in the search tab. When you click "new search" you have the option of selecting "browse host".

For 2 I sadly can't help directly.

I know that you need to initiate the download with the address of the host as first source - maybe that helps you.

What I did for subscriptions (with much help from Gregor) was this:

Code:
public void createDownload( String uriStr ) throws URIException
    {
        if (uriStr.length() == 0)
        {
            return;
        }
        URI uri = new URI( uriStr, true );
        Servent.getInstance().getDownloadService().addFileToDownload( uri, true );
    }
-> https://phex.svn.sourceforge.net/svn...ownloader.java

With phex.servent.Servent and org.apache.commons.httpclient.URI;

The URI was a magnet with a first source.

But I assume addFileToDownload() has a more convenient way to add a download with source (which doesn't require creating and then parsing an URI for the sole reason of passing a source - subscriptions were magnet uris, so this way was useful back then).
__________________

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