Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Gnutella Development Discussion (https://www.gnutellaforums.com/general-gnutella-development-discussion/)
-   -   connection question! (https://www.gnutellaforums.com/general-gnutella-development-discussion/21334-connection-question.html)

ferret-2000 August 6th, 2003 05:23 AM

connection question!
 
I wrote a simple Gnutella Client accoding to Gnutella 0.4 protocol.Where i tried to use this client connecting bearshare client,after the socket connection established,my program send a standard protocol message:"GNUTELLA CONNECT 0.4\n\n",the socket was closed by bearshare immediately.When i simply changed the message into "GNUTELLA CONNECT 0.6\r\n",the bearshare client colsed the socket after a while(the bearshare version:4.2.7 Build 9).
So i guess bearshare only suport Gnutella 0.6 protocol.Now i do want to know,my client surely can not connect to the Gnutella network today?If i chang my program accoding standard Gnutella 0.6 protocol, will i surely be able to connect to the Gnutella network which organized by the other's client and sharing files with them?
Thank a lot!

trap_jaw4 August 6th, 2003 06:35 AM

You probably will be able to connect to the network as soon as you support the 0.6 handshake, - but as long as you don't support at least pings and pongs, your connections won't be very stable, I'm afraid.

ferret-2000 August 11th, 2003 07:07 AM

now, i have something puzzled about Gnutella 0.6 HandShakes.In version 0.6,the progress is described as:
1. C sends the string GNUTELLA CONNECT/0.6\r\n where 0.6 is the protocol version and \r denotes the carriage return character (ASCII character 13)
2. C sends capability headers (not including vendor specific headers), each terminated by \r\n, with an extra \r\n at the end
3. S responds with the string GNUTELLA/0.6 200 string\r\n. The string should be OK, but clients are advised to only check the 200 code
4. S sends all its headers in the same format as in step 2
5. C responds with the string GNUTELLA/0.6 200 OK\r\n, as in step 3 if the client, after parsing all headers sent by S, still wants to connect. Otherwise a reply containing an error code is sent and the connection is closed
6. C sends any vendor specific headers to S in the same format as in step 2
7. Connection is established and C and S can exchange messages

But i do not know what the headers in step2,4 and 6 are.Are these the ping and pong?If they are ,why they are some but not one?

I will be appreciateed to receive your answer.If you can,please describe them in details. Thanks a lot!

ferret-2000 August 11th, 2003 07:14 AM

Another question,How i can make my Client support the Ultrapeer to make it easy to connect the other servants?

trap_jaw4 August 11th, 2003 08:06 AM

Didn't you read the protocol specs? It's all at rfc-gnutella.sf.net.

The gnutella 0.6 handshake is very similar to the http handshake. Additional headers are defined by other gnutella proposals but many headers are not documented anywhere.

Pings and Pongs are gnutella messages defined in the gnutella 0.4 protocol.

For becoming an ultrapeer you have to support QRP.

ferret-2000 August 12th, 2003 08:11 PM

1 Attachment(s)
thanks for your suggestion,i have read rfcGnutella,but i still have something puzzled,in rfcGnutella, it says that client accoding to Gnutella 0.4 protocol also can connect to Gnutella network.Is this true?Now ,can this realize?
thans a lot!

ferret-2000 August 12th, 2003 08:15 PM

above is the exe i wrote,it is according to Gnutella 0.4 protocol.I do not know whether it work,because my network is using NAT.If you would like to test it,i will be very appreciated!
Thanks!


All times are GMT -7. The time now is 02:51 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.