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


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 


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:28 AM.


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.