Gnutella Forums  

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

General Discussion For anything which doesn't fit somewhere else (for PHEX users)


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old January 15th, 2007
Gnutella Admirer
 
Join Date: November 23rd, 2003
Posts: 70
Linuxhippy is flying high
Default Howto realite more than 255 serach results?

Hello,

Phex currently "only" supports 255 results per host per query, this is the maximum which may be returned by a single query-result package. Browse host works arround this limitation yb sending many packages, so I tried to change MessageDispatched.respondToQuery to the following, instead of the single-package sending code:

[source]
QueryResponseRecord record;
ShareFile sfile;
int sendCount = 0;
while (sendCount < resultCount)
{
int currentSendCount = Math.min( 255, resultCount
- sendCount );

QueryResponseRecord[] records = new QueryResponseRecord[currentSendCount];
for (int i = 0; i < currentSendCount; i++)
{
sfile = resultFiles[sendCount + i];
Long networkCreateTime = sfile.getNetworkCreateTime();
AltLocContainer altLocContainer = sfile.getAltLocContainer();
Set<DestAddress> altLocs = null;
if ( altLocContainer != null )
{
altLocs = altLocContainer.getAltLocForQueryResponseRecord();
}
record = new QueryResponseRecord( sfile.getFileIndex(),
sfile.getURN(), (int) sfile.getFileSize(),
sfile.getFileName(), networkCreateTime.longValue(),
altLocs );
records[i] = record;
}

NetworkManager networkMgr = NetworkManager.getInstance();
DestAddress hostAddress = networkMgr.getLocalAddress();
QueryResponseMsg queryResponse = new QueryResponseMsg( header,
networkMgr.getServentGuid(), hostAddress,
Math.round(
BandwidthPrefs.MaxUploadBandwidth.get().floatValue ()
/ NumberFormatUtils.ONE_KB ), records );

// send msg over the wire
sourceHost.queueMessageToSend(queryResponse);
// and count message
MessageCountStatistic.queryHitMsgOutCounter.increm ent( 1 );

sendCount += currentSendCount;
}
[/source]

However, how could it be different ... it does not work.

Any ideas what could be the problem? Is phex able to handle multiple responses per query from the same host?

Thank you in advance, lg Clemens
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
problem in some serach words killerpm Open Discussion topics 1 June 22nd, 2005 09:00 AM
Howto download many files at once? Linuxhippy General Discussion 1 December 27th, 2004 12:09 PM
Howto Connect Telex4 Qtella (Linux/Unix) 3 January 26th, 2003 10:05 PM
2.8 wersion-Get serach results but nothing showing to choose from sphinxx General Mac Support 2 December 26th, 2002 12:15 PM


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