|
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 |
| |||
Some servents block out mp3 and some other words. Otherwise, everyone would search for mp3 and we'd have thousands of query hits flying back and forth, flooding the network. I suggest trying some other words, ones that give some responses when you search for them on your other gnutella servents. I get responses when I search for mp3, but I know I'm not getting the responses I would if newer servents weren't blocking queries like that. Here is how I send queries - 0-15: GUID 16 numbers [same as ping GUID] 16: 0x80 17: ttl 7 18: hops 0 19: querylength+3 20-22: all 0's 23-24: all 0's 25 through querylength+25 : query 26+querylength: 0 I had trouble initially. I develop on Unix (Linux). What I did was install gnut, a working Gnutella servent and then tcpdump so I could see how it was sending queries properly. Then I ran tcpdump on my program and saw where I had gone wrong and fixed it. There's a Windows version of tcpdump called windump, although I haven't used it. Tcpdump (and probably windump or some other packet sniffer) is quite handy in helping debug many Gnutella problems. |
| |||
If the connection is closed right after you sent the query request, the host you were connected to, could not read your query properly and dropped the connection because of an invalid gnutella message. So the problem has to be your query. |
| |||
Ehh, guys thanks for the replies, everyone is saying my query is wrong. But I've posted (first posting in this thread) how it exactly looks. From there you can tell that I've used little-endian byte order. I dont see anything wrong! ps. I know obviously I'm doing something wrong, since other clients are working. But do you guys see anything wrong with my query? ds. |
| |||
No but obviously the other clients do (and I assume you mean more than one drops you). Computers are much better than we are at telling if something is one byte off. Why not post for us a actual hex dump from your connection at the TCP/IP side? And compare that with a hex dump from some other working client. So much fun. |
| |||
Your Query might look OK in the code, but does it actually send out correctly? For example, does it send a the Query header, then a Pong, then the remainder of the Query? (because you're not controlling the outgoing flow). What you should do, is install a number of Gnutella clients on your own system, then connect to them with your Gnutella client (make sure, each other Gnutella client uses a different port, of course). Once you've done that, send out the query and see how the other clients respond (ie., any error messages etc. BearShare provides fairly decent info on that, so does GTK-gnutella). |
| |||
I've checked that the code is correct using the VC++ debugger + SoftICE, also double checked the outgoing flow with NC (netcat) and tcpdump... Note, I'm using 0.4 and not the rich 0.6 protocol. Why should I send a PONG after the QUERY?? I dont understand that... thnx |
| |||
Quote:
Did you try installing another Gnutella client on your system though? I think it'll really be helpful in debugging - certainly has been for me. Try the Gnutella client that use the "BYE" message, such as GTK-Gnutella or Shareaza (the new one). |
| |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
queries | samdrew0004 | BearShare Open Discussion | 0 | November 3rd, 2005 11:19 PM |
Upload Queries | fofofo1003 | Download/Upload Problems | 1 | April 21st, 2005 01:47 PM |
ultrapeer queries | CyBorG3132 | Download/Upload Problems | 1 | April 21st, 2005 05:11 AM |
No response to my QUERIES! | AliSweden | General Gnutella Development Discussion | 7 | June 24th, 2002 04:29 PM |
queries | Unregistered | Open Discussion topics | 0 | March 14th, 2002 08:19 PM |