Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella Development Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Gnutella Development Discussion For general discussion about Gnutella development.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old August 31st, 2006
Novicius
 
Join Date: August 31st, 2006
Posts: 2
beat is flying high
Default Message Problems

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());



	}
}
Can i Ping a Gnutella host without handshaking before??

thx beat,austria
Reply With Quote
  #2 (permalink)  
Old August 31st, 2006
birdy's Avatar
Airhead
 
Join Date: October 18th, 2004
Location: Perth, Australia
Posts: 889
birdy has a distinguished reputationbirdy has a distinguished reputation
Default

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/
Reply With Quote
  #3 (permalink)  
Old August 31st, 2006
Novicius
 
Join Date: August 31st, 2006
Posts: 2
beat is flying high
Default

thx, ive posted there too.
Reply With Quote
  #4 (permalink)  
Old September 13th, 2006
arne_bab's Avatar
Draketo, small dragon.
 
Join Date: May 31st, 2002
Location: Heidelberg, Germany
Posts: 1,881
arne_bab is a great assister to others; your light through the dark tunnel
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -7. The time now is 04:55 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.