Gnutella Forums  

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

General Gnutella Development Discussion For general discussion about Gnutella development.


Reply
 
Thread Tools Display Modes
  #1  
Old October 8th, 2008
Atomical Atomical is offline
Novicius
 
Join Date: October 8th, 2008
Posts: 3
Atomical is flying high
Default Gnutella PHP,QRT example

I'm testing a PHP Gnutella client and I need to generate a QRT table so I can receive data and test the functionality. I read over the spec and I still can't figure this out or get it right. If anyone could shed some light on what I'm doing wrong that would be amazing! I suspect I'm not packing/formatting the binary data right. Here's my code:

PHP Code:
        //write QRP reset message
        
$variant "\0x0";
        
$table_length pack('V',65536);
        
$infinity pack('C',1);
        
$packet $variant $table_length $infinity;
        
$reset create_header"\30x0"1,0$packet );
        
        
fwrite($fp$reset,strlen($reset));
        
        
        
//4 kilobyte
        
$byte '';
        for ( 
$o 0$o 8/*(1024*4)*/$o++){
            
$byte .= 1;
            
//$byte .= bindec(1111);
            //$byte .= pack('C',1); 
        
        
}
        
        
        
//write qrp table
        
$packet '';
        for ( 
$t =0$t 16$t++ ){
    
            
$variant "\0x1";
            
$seq_no pack('C',$ttt $t+1);
            echo 
"Patch $ttt of 16\n";
            
$seq_size pack('C',16); //bits
            
$compressor "\0x0";
            
$entry_bits pack('C',8);
            
$packet $variant $seq_no $seq_size $compressor $entry_bits $byte;
            
            
$packet create_header("\30x0",1,0,$packet);
            
            

            
fwrite($fp,$packetstrlen($packet));
            
        
        } 
Reply With Quote
  #2  
Old October 13th, 2008
arne_bab's Avatar
arne_bab arne_bab is offline
Draketo, small dragon.
 
Join Date: May 31st, 2002
Location: Heidelberg, Germany
Posts: 1,881
arne_bab is a great assister to others; your light through the dark tunnel
Default

I can't help directly with that.

But I just approved your message to the gdf mailinglist - you should get an answer there.
__________________

-> put this banner into your own signature! <-
--
Erst im Spiel lebt der Mensch.
Nur ludantaj homoj vivas.
GnuFU.net - Gnutella For Users
Draketo.de - Shortstories, Poems, Music and strange Ideas.
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What posts belong in this General Gnutella / Gnutella Network Discussion section! Lord of the Rings General Gnutella / Gnutella Network Discussion 0 November 17th, 2005 06:54 AM
Should Gnutella developers work on measures to achieve anonymity on Gnutella? Joakim Agren General Gnutella / Gnutella Network Discussion 23 August 27th, 2003 08:18 AM
Warning to Gnutella developers: Design a system of anonymity or Gnutella is doomed Unregistered General Gnutella / Gnutella Network Discussion 16 June 28th, 2002 06:54 AM
is gnutella down?? fcox1 General Gnutella / Gnutella Network Discussion 7 April 4th, 2002 08:47 PM
Gnutella Resources - Everything you need for Gnutella Unregistered General Gnutella / Gnutella Network Discussion 0 July 21st, 2001 07:05 PM


All times are GMT -7. The time now is 12:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.

Copyright © 2026 Gnutella Forums
All Rights Reserved