|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Discussion For anything which doesn't fit somewhere else (for PHEX users) |
| LinkBack | Thread Tools | Display Modes |
| |||
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 |
| |
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 |