![]() |
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. |
I believe in our faq you will find all information you need: http://www.gnutellaforums.com/showth...&threadid=4638 Morgwen |
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. |
Quote:
You asked for documentation not for source code... you have the Phex source, you have all you need!?! :confused: :confused: Morgwen |
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. |
Quote:
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 |
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. |
Quote:
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 |
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. |
Quote:
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 |
All times are GMT -7. The time now is 09:56 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.