|
#1
|
||||
|
||||
|
For research purposes, I would need to locate which modules allow Ultrapeers to forward the query responses. The goal of the research would be to implement filters on ultrapeers that allow for instance filters on the basis of extension + size (example, if the query results is a mp3 file less than 500 KB, then drop the query that you are propagating).
I tried modifying the file /core/com/limegroup/gnutella/Response.java but it is not the correct one (guess it is just the response regarding files that come from that specific peer, not responses that are routed back). Does anyone have any idea about which file i should modify? Thanks a bunch in advance for any suggestion! |
|
#2
|
||||
|
||||
|
Response is just a container of data, it doesn't do any actual logic.
The code you're looking for is likely in MessageRouter.handleQueryReply. The line that says, "rh.handleQueryReply(queryReply, handler);" is the actual handling of the reply. Depending on what is implementing the ReplyHandler, it may show the reply in the GUI, forward it along a ManagedConnection, send it over UDP, or a variety of other things. Be aware that not all query replies travel through the network. Many queries are marked as wanting OOB results, and the replier will reply directly to the querier using UDP. Also note that even when the query is in going through the network, the existing logic tries very hard to avoid parsing the reply itself (because parsing all replies passing through an Ultrapeer would be very expensive CPU-wise), so adding this burden may have some unexpected results. |
|
#3
|
||||
|
||||
|
I understand.
Thank you so much for your prompt and exhaustive reply, it's been really helpful to me.
__________________
~~~ There are 10 types of people, those who understand binary, and those who don't. ~~~ |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|