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 May 28th, 2002
Apprentice
 
Join Date: May 27th, 2002
Posts: 8
loStHead is flying high
Default Sockets close

Hi, Im kind of new to this and I have a problem...
Im using asynchronous non-blocking sockets on my Gnutella, and just after I make a successfull connection, I send a ping, receive pongs, and then the socket disconnects. Im using plain send() and recv() calls and a main poll cycle which constantly checks for incoming packets. Im not sure if the problem is that Im getting out of sync or that I should send pings more often to keep the connection alive. Im also getting lots of query, pongs, pings, etc which I (guess) successfully broadcast. Just after that, the socket resets the connection.

eg. a poll tells me I have incoming data to handle, and then my receive function receives 0 bytes. Why's that?

Thanks
Reply With Quote
  #2 (permalink)  
Old May 31st, 2002
Apprentice
 
Join Date: May 27th, 2002
Posts: 8
loStHead is flying high
Default

please someone!!! im almost on deadline for this project...
Reply With Quote
  #3 (permalink)  
Old May 31st, 2002
Gnutella Veteran
 
Join Date: March 24th, 2002
Location: Virginia
Posts: 101
tshdos is flying high
Default

What client are you connecting to and what protocol version are you using?
Reply With Quote
  #4 (permalink)  
Old May 31st, 2002
Unregistered
Guest
 
Posts: n/a
Default Re: Sockets close

Quote:
Originally posted by loStHead
using asynchronous non-blocking sockets ... and a main poll cycle which constantly checks for incoming packets
those two things does not mach to each other.
Reply With Quote
  #5 (permalink)  
Old May 31st, 2002
Apprentice
 
Join Date: May 27th, 2002
Posts: 8
loStHead is flying high
Default

thanks, maybe Im a bit confused about how are asynchronous sockets implemented. I've read everything I've found about gnutella, and I really cant figure out how this is actually done. So I decided to do it my way...dunno if what Im doing has a name.
Sorry about reinventing the wheel, I really have to.
So is what Im doing fully wrong, Im headin the wrong way?
Reply With Quote
  #6 (permalink)  
Old May 31st, 2002
Apprentice
 
Join Date: May 27th, 2002
Posts: 8
loStHead is flying high
Default

tshdos:
Im using 0.4 handshaking, and Im connecting to a localhost with mutella, which parses me a bunch of pongs (from internet) to which I connect (so I dont know what clients Im connecting to)..
Reply With Quote
  #7 (permalink)  
Old June 4th, 2002
Apprentice
 
Join Date: May 27th, 2002
Posts: 8
loStHead is flying high
Default

Im really afraid bout having to start my gnutella over again and make things right this time..
so, please could somebody give me a clear explanation of how asynchronous sockets work? pleezzzzzz
Reply With Quote
  #8 (permalink)  
Old June 4th, 2002
Disciple
 
Join Date: December 14th, 2001
Posts: 13
TorK is flying high
Default

You really should use 0.6 handshaking. Its not much more difficult and everyone else is using it.

See
http://cvs.sourceforge.net/cgi-bin/v...ella/Draft.txt
Click the first "(view)"

I don't have a good answear to your question. I suppose you do aswear any pings you receive?

/Tor
Reply With Quote
  #9 (permalink)  
Old June 4th, 2002
Qtella Developer
 
Join Date: March 1st, 2002
Location: Munich, Germany
Posts: 46
Etzi is flying high
Default

Here you can find s.th. about network programming. Maybe this will help you.
http://www.ecst.csuchico.edu/~beej/guide/net/html/
Reply With Quote
  #10 (permalink)  
Old June 4th, 2002
Apprentice
 
Join Date: May 27th, 2002
Posts: 8
loStHead is flying high
Default

thanx guys!
yes, Im answering pings and Im currently workin to see whether my pongs are OK
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
Sockets GaryM Support: General 1 August 27th, 2002 02:04 PM
Question on Gnucleus sockets, STL Kaom Gnucleus (Windows) 2 August 20th, 2002 01:08 PM
Sockets, C and gnutella patricio General Gnutella Development Discussion 5 May 31st, 2002 06:20 AM
Should LimeWire close when I close the terminal window? Unregistered General Linux Support 4 September 19th, 2001 08:37 PM
Sockets accumulating Unregistered Connection Problems 0 September 14th, 2001 09:14 PM


All times are GMT -7. The time now is 06:40 PM.


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

Copyright © 2020 Gnutella Forums.
All Rights Reserved.