Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Gnutella Development Discussion (https://www.gnutellaforums.com/general-gnutella-development-discussion/)
-   -   Sockets close (https://www.gnutellaforums.com/general-gnutella-development-discussion/11841-sockets-close.html)

loStHead May 28th, 2002 04:31 PM

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

loStHead May 31st, 2002 07:05 AM

please someone!!! im almost on deadline for this project...

tshdos May 31st, 2002 03:52 PM

What client are you connecting to and what protocol version are you using?

Unregistered May 31st, 2002 03:58 PM

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.

loStHead May 31st, 2002 07:19 PM

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?

loStHead May 31st, 2002 07:42 PM

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)..

loStHead June 4th, 2002 12:10 PM

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

TorK June 4th, 2002 12:34 PM

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

Etzi June 4th, 2002 12:36 PM

Here you can find s.th. about network programming. Maybe this will help you.
http://www.ecst.csuchico.edu/~beej/guide/net/html/

loStHead June 4th, 2002 04:30 PM

thanx guys!
yes, Im answering pings and Im currently workin to see whether my pongs are OK


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