View Single Post
  #1 (permalink)  
Old November 16th, 2004
GSt GSt is offline
Novicius
 
Join Date: November 16th, 2004
Posts: 2
GSt is flying high
Unhappy Handshake not working

hi

i'm writing a small gnutella client, but up till now can't even establish a connection, because the other peer always responds with
Code:
GNUTELLA/0.6 500 Invalid Handshake
i'm developing my client using java, what i'm sending to the other peer as handshake is

Code:
GNUTELLA CONNECT/0.6\r\n
User-Agent: test/0.1\r\n
\r\n
the java code i'm using to send it is

Code:
String msg = "";
msg += "GNUTELLA CONNECT/0.6\r\n";
msg += "User-Agent: test/0.1\r\n";
msg += "\r\n";
			
outputStream.write(msg.getBytes(), 0, msg.getBytes().length);
outputStream.flush();
i already studied the 0.6 protocol spec, read tbrough various forums and had a look at the open source client phex, but i can't figure out what's wrong with my handshake, phex is doing exactly the same.

please help, thanks
Reply With Quote