![]() |
|
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 |
| |||
![]() hi. i´m interessted in the Gnutella Protocol and i´m doing my first steps with programming it. But i have a problem. when the handshake connection is established (it works cause i get a GNUTTELLA CONNECT OK... from der server servent) i´m trying to send a ping, hoping to receive a pong. But nothing happens. I cannot find errors in my code. Sb please help me. Code: import java.io.*; import java.net.*; public class Test { public static void main (String[] args) throws IOException{ byte[] ping = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x10,0x11,0x13, 0x14,0x0A,0x0B,0x0C,0x0D,0x0E,0x00,0x00000000}; Socket s = new Socket("67.188.93.23",6346); //"201.37.69.72",12937 PrintStream os = new PrintStream(s.getOutputStream()); //String connect = "GET /get//walkon.mp3 HTTP/1.1\r\nUser-Agent: Gnutella\r\nHost: 127.0.0.1:14236\r\nConnection: Keep-Alive\r\nRange: bytes=0-\r\n\n"; String connect = "GNUTELLA CONNECT/0.6\n\n"; os.print(connect); BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream())); os.print("GNUTELLA CONNECT/0.6 200 OK\n\n"); for(int i = 0; i<ping.length;i++) { os.print(ping[i]); } System.out.println(in.readLine()); } } thx beat,austria |
| ||||
![]() You'd probably be better off going to the forum below (you'll have to register again over there)... they have a programming section ![]() http://www.limewire.org/forum/ |
| ||||
![]() You might want to have alook here: http://gnuticles.gnufu.net/dev-infos.html Initial Handshake First from a_guest_in_the_machine from gnutellaforums.com: The initial handshake goes like this (contradicting current specs): you GNUTELLA CONNECT/0.6\r\n \r\n ultrapeer GNUTELLA/0.6 200 (...)\r\n (optional server specifics)\r\n \r\n you GNUTELLA/0.6 200\r\n \r\n
__________________ ![]() -> 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. |
![]() |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
i see message | albiondean | Connection Problems | 9 | February 20th, 2010 10:57 PM |
new message | 01250frider | Open Discussion topics | 4 | August 5th, 2005 06:41 AM |
message of the day | masa | Chat - Open Topics - The Lounge | 0 | February 17th, 2005 01:05 AM |
Getting Message | Unregistered | Gnotella (Windows) | 0 | July 23rd, 2001 06:15 AM |