Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Gnutella / Gnutella Network Discussion (https://www.gnutellaforums.com/general-gnutella-gnutella-network-discussion/)
-   -   gnutella and tcp/ip (https://www.gnutellaforums.com/general-gnutella-gnutella-network-discussion/1135-gnutella-tcp-ip.html)

fossilltemp April 13th, 2001 09:29 PM

gnutella and tcp/ip
 
I am looking for information on how gnutella is built upon tcp/ip. i've looked through the protocol documentation provided by clip2 but that doesn't say much about how tcp/ip is related to the gnutella protocol or how they play so nicely together. Could anybody enlighten me or point me in the right direction towards some docs?

dux April 14th, 2001 05:06 PM

TCP/IP is supposed to be transparent to application level protocols like gnutella. Data is written to a TCP socket and it comes out a socket at the other end of the connection. You can just put the gnutella message into an array and call socket.write(message) or something similar, and message = socket.read() to send and receive gnutella messages.
The TCP/IP packets themselves don't even need to wrap a gnutella message and could just as well contain only a few bytes of one message, or several whole messages, in one packet. A smart client will let a set of queries and pings collect over a short period of time, and write them to the socket together so that all messages are sent out in one TCP/IP packet. Since the overhead for TCP/IP is 40 bytes per packet (20 IP, 20 TCP), aggregating several messages into one packet meaningfully reduces bandwidth. If the average gnutella message is 30 bytes, and there is an average of 8 messages per second, aggregating messages might abridge overhead from (30+40)*8 = 560 bytes/second to 30+(40*8) = 350 bytes/second.
That's really all you need to know about TCP before implementing gnutella protocol. Hope that meets what you needed to know.

simpleboy April 15th, 2001 02:13 AM

You could also look at it like the old modem days, you call someone and connect to their modem, then you type something and they type something back. You didn't worry about the phone company, the phone lines or how the modem worked. Picture the IP address as a phone number. Now if only people would tell the government that a socket based connection is the same as a private phone call, maybe we could get some privacy like we do with VOICE packets.


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