|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Gnutella Development Discussion For general discussion about Gnutella development. |
| LinkBack | Thread Tools | Display Modes |
| |||
Help On Gnutella Protocol I am trying to make simple component that makes a connection to a Gnutella client. Right now i managed to get a "GNUTELLA OK" reply but when i send back a ping message the connection drops. I read that i should send a ping after getting the OK from the client. Is this right? What am i doing wrong? The component is written in Delphi with the TWsocket component. |
| ||||
PS: GodXBlue gave me another hint on IRC. Make sure you follow the protocoll specification for connectiing and send only 'GNUTELLA CONNECT/0.4\n\n'... and NOTHING more! Each extra byte is definitely wrong here and will corrupt your data stream, e.g. any following descriptor will be corrupted. |
| ||||
When i send the GNUTELLA CONNECT/0.4\n\n string it is ok because i have tested it and i take a succesful reply (GNUTELLA OK). The structure of the Ping message that i send is exactly the same with the protocol specifications. The GUID is beeing created with the CoCreateGUID function of the Windows API and the TTL value is 5. Also the HOPs value is 0 and the data length is zero. When i am trying to connect to Bearshare at the Hosts Screen in the status of the connection writes 'Coming' and when i connect writes 'Temp' and counts about 5 seconds and then i get a disconnect time expired message... |
| ||||
You automatically get a "GNUTELLA OK" after sending the two returns (\n). When you will send extra bytes after the two returns, you will shift your binary data stream and every following descriptor will be corrupted... did you understand this and checked against it? Most existing clients will drop a connection when they receive bad data. Sorry, I have no further idea.... perhaps look inside existing code or test if two of your clients will understand each other? |
| |||
You may have a problem with variable alignment if you created a structure for the descriptor and fill the members of it. Ofc it depends on the type of variables you used, your compiler and it's alignment. If you created your own structure (typedef struct {} in C), you may want to add a safety check at the initialisation code which tests for the sizeof() of the struct. |
| |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spin-off of Gnutella Protocol? | PhreakerONE | General Gnutella Development Discussion | 0 | June 6th, 2002 03:57 PM |
gnutella protocol | Unregistered | General Gnutella / Gnutella Network Discussion | 2 | May 19th, 2002 11:23 AM |
Gnutella protocol and hostcaches | bateman23 | General Gnutella Development Discussion | 5 | January 9th, 2002 04:42 AM |
gnutella protocol v0.6? | chuckles42 | Gnucleus (Windows) | 0 | September 15th, 2001 09:11 AM |
Gnutella protocol to sloppy? | Tiago s1x | General Gnutella Development Discussion | 3 | August 6th, 2001 05:20 PM |