Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Phex (Cross-platform) > Development & Coding > Development Open Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

Development Open Discussion Anything else about the Phex development


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old August 4th, 2009
Novicius
 
Join Date: August 4th, 2009
Posts: 2
2eXtreme is flying high
Default [Wanted] Simple Phex API Tutorial - how to do a search?

Hi Guys,

I've posted in another thread, but I've deiced I like Phex best, out of all my attempted routes at Gnutella development.

The thing is, I'd really love a tutorial on how to do a simple search with the Phex API?

When I say simple, I'm hoping for only a few classes to be used, with the code something like:

Code:
//Main.java

public class Main{

public static void main(String [] args){
new Main(args);
}

public Main(String [] items){
if (items.length == 1){
new Search(items[0]);
}
}
} 

//Search.java

public class Search{
public Search(String searchForThis){
//Connect to Gnutella
//Search network for search term
//Calls a method that adds files to result list
addResult(fileN);
//after network has been searched
System.out.println("Finished searching!");
}
public void addResult(File myFile){
//adds a file to an array list of files
myResults.add(myFile);
System.out.println("Found: " +myFile.getName());
}
}

//File.java
public class File{
public String getName(){
return this.name;
}
//other members
}
Reply With Quote
  #2 (permalink)  
Old January 14th, 2010
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

Something like this would be useful to me, too.

How to do basic tasks in Phex.

We can get javadocs via calling

Code:
mvn javadoc:javadoc
in the subversion repo: http://www.phex.org/wiki/index.php/B...rom_Subversion

But that's a pretty lowlevel description, so it would be nice to have a higher level description (also for the jython commandline UI I want to do):

* How can we start a search cleanly - and get the results?
* How can I add a connection by IP:PORT?
* How can I tell Phex to connect/disconnect the network?
* How can I start a download by magnet or search result?

Related: Our wiki has a page with some additional info on what a GUI needs from an API: http://www.phex.org/wiki/index.php/C...m_a_backend.3F

PS: Sorry that I didn't answer earlier. I couldn't answer the question, so I decided to avoid muddlign things up. On hidnsight I don't think that that decision was overly clever, but I can't change it now...
__________________

-> 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
  #3 (permalink)  
Old February 28th, 2010
Devotee
 
Join Date: December 21st, 2009
Posts: 29
hustnn is flying high
Default about the API

If I want to develop a gnutella client from scratch< I think the gnutella should be a standard and it shuold be not related the concept implementation such as limewire and phex.

So if i want to develope it follow the protocol standard, then it should can work with limrework and phex clients.

So,where can I find the related toturial or protocol document of this?
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 10:15 AM.


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.