Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella Development Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Gnutella Development Discussion For general discussion about Gnutella development.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old November 20th, 2003
Apprentice
 
Join Date: November 20th, 2003
Location: Portugal
Posts: 6
reise is flying high
Default Need example of using phex.

Hi, I need to make a client for gnutella that logs certains messages. This is to analyze the TTL of hosts on the network for a school project.
I was looking to phex source and would like to use it as a starting point to it, but I can't find any documentation on how to make a connection, set listeners to messages, etc.
Anyone has simple documentation on how to make this, like:
1-start a conenction;
2-listen to pings and pongs;
3-listen to search querys;

Any help would be very aprreciated,
Eduardo

PS: I forgotted to mention that I was trying to use JTella but I can't connect to any host, the log shows a lot of exceptions in JTella, thats way I wanted to look at phex.

Last edited by reise; November 20th, 2003 at 10:54 AM.
Reply With Quote
  #2 (permalink)  
Old November 20th, 2003
Morgwen's Avatar
lazy dragon - retired mod
 
Join Date: October 14th, 2001
Location: Germany
Posts: 2,927
Morgwen is flying high
Default

I believe in our faq you will find all information you need:

http://www.gnutellaforums.com/showth...&threadid=4638

Morgwen
Reply With Quote
  #3 (permalink)  
Old November 20th, 2003
Apprentice
 
Join Date: November 20th, 2003
Location: Portugal
Posts: 6
reise is flying high
Default

I only could find theory. I already have knowledge about the protocol I wanted example source code like JTella has, but using the phex network classes.

Thanks anyway.
Reply With Quote
  #4 (permalink)  
Old November 20th, 2003
Morgwen's Avatar
lazy dragon - retired mod
 
Join Date: October 14th, 2001
Location: Germany
Posts: 2,927
Morgwen is flying high
Default

Quote:
I was looking to phex source and would like to use it as a starting point to it, but I can't find any documentation on how to make a connection, set listeners to messages, etc.


You asked for documentation not for source code...

you have the Phex source, you have all you need!?!



Morgwen
Reply With Quote
  #5 (permalink)  
Old November 20th, 2003
Apprentice
 
Join Date: November 20th, 2003
Location: Portugal
Posts: 6
reise is flying high
Default

I'm sorry if I didn't explained what I want. I wanted something like this (taken from JTella examples):
...
try
{
// Start a network connection and listen for succesful connection
GNUTellaConnection c = new GNUTellaConnection(host, port);
c.getSearchMonitorSession(new TestReceiver());
c.start();

}
catch (Exception e)
{
e.printStackTrace();
}

}

/**
* Test class for monitoring query messages, prints out queries to the console
*
*/
static class TestReceiver extends MessageReceiverAdapter
{
public void receiveSearch(SearchMessage searchMessage)
{
System.out.println("Search Session received: " +
searchMessage.getSearchCriteria());
}
}

I wanted to know if there is an example like this but using the phex source code.
Reply With Quote
  #6 (permalink)  
Old November 20th, 2003
Morgwen's Avatar
lazy dragon - retired mod
 
Join Date: October 14th, 2001
Location: Germany
Posts: 2,927
Morgwen is flying high
Default

Quote:
Originally posted by reise
I wanted to know if there is an example like this but using the phex source code.
Hmm...

Jtella is using Java and Phex is using Java - so you have an example in Java, if you want to know how the Phex developer connect to gnutella - LOOK in the source it canīt be such a big difference... I donīt know the source but it is under GPL so it should be well documented...

What I donīt understand is that you want to analyze TTL for schoool but it seems that you donīt know or are still learning programming... what is the target? What are you learning? I hope you donīt search for anybody who does your homework...

Morgwen
Reply With Quote
  #7 (permalink)  
Old November 21st, 2003
Apprentice
 
Join Date: November 20th, 2003
Location: Portugal
Posts: 6
reise is flying high
Default

I know programming but my school work is a study about gnutella host ttl and traffic patterns not about writing a gnutella client.

And as phex use a lot more that I need to I didn't want to have to understand the whole source code, but I see that I don't have another way.

Thanks for your replys anyway.
Reply With Quote
  #8 (permalink)  
Old November 21st, 2003
Morgwen's Avatar
lazy dragon - retired mod
 
Join Date: October 14th, 2001
Location: Germany
Posts: 2,927
Morgwen is flying high
Default

Quote:
Originally posted by reise
And as phex use a lot more that I need to I didn't want to have to understand the whole source code
I think the Phex source is explained.

Jtella documented where he connects:

// Start a network connection and listen for succesful connection
GNUTellaConnection c = new GNUTellaConnection(host, port);
c.getSearchMonitorSession(new TestReceiver());
c.start();

You have only to search in the Phex code for the documentation... there is no need to understand the whole code.

You can also look in the Limewire code its also written in Java.

Morgwen
Reply With Quote
  #9 (permalink)  
Old November 24th, 2003
Apprentice
 
Join Date: November 20th, 2003
Location: Portugal
Posts: 6
reise is flying high
Default

FYI Morgwen the phex source code is poorly documented. I ran javadoc on the source tree and almost all the classes doesn't have a description of what is does!

Let's go deep in the code to understand it!

btw, do you know if the phex guys read this forum? Maybe they could help me.
Reply With Quote
  #10 (permalink)  
Old November 24th, 2003
Morgwen's Avatar
lazy dragon - retired mod
 
Join Date: October 14th, 2001
Location: Germany
Posts: 2,927
Morgwen is flying high
Default

Quote:
Originally posted by reise
btw, do you know if the phex guys read this forum? Maybe they could help me.
Yes.

http://www.gnutellaforums.com/member...nfo&userid=880

Send him a PM.

Donīt forget you could still look in the Limwire source, its also in Java!

Morgwen
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[BUG] Phex 2.6.4.89 - phex upload stuck with "initializing" uploads pawelsz General Discussion 1 January 31st, 2006 03:34 PM
No downloads from phex to phex Only A Hobo General Discussion 3 October 21st, 2005 03:20 AM
New to Phex ukbobboy01 General Discussion 4 October 14th, 2005 03:30 AM
[BUG] Phex 2.6.4.89 - phex window graphic corruption pawelsz General Discussion 4 September 18th, 2005 07:38 PM
Decentralized Host-Cache - Only PHEX has one - So Promote PHEX Unregistered General Discussion 0 January 31st, 2002 06:29 AM


All times are GMT -7. The time now is 07:03 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.