Developers.Gnutella.Notes.Introduction

From Shareaza Wiki
Jump to navigation Jump to search

Introduction to the Gnutella Network

This document is intended for readers with a fair knowledge of network programming but does not require any previous Gnutella experience

Yeay! At last!

1.2 Terminology and Network Management

A Gnutella program running on a computer is called a servent - and this weird word comes from smashing together server and client. The computer the program runs on is called a peer, node, or host.

The names Gnutella defines are important, because we can use them to name parts of the Shareaza code. For instance, a remote computer running peer-to-peer software in the Shareaza code is represented with a CNeighbours object. This could have been named CServent, CPeer, CNode, or CHost. Gnucleus uses node. I'd like to use host to mean an IP address and port number. Servent is too weird. I think CPeer is the best name.

What Shareaza calls a packet, the document names a message.

1.3 Characteristics


Resources can be anything: mappings to other resources, cryptographic keys, files of any type, meta-information on keyable resources, etc. However, the semantics for locating and handling resources other than plain files are not specified in this document.

I'm glad they are going to keep this restricted to file sharing.


Resource data exchanges between nodes are negotiated using the standard HTTP. The Gnutella network is only used to locate the nodes sharing those resources.

This is a fancy way of saying: Gnutella programs with socket connections exchanging packets just talk about more computers they can connect to and what files they have and want. Actual file transfers are done totally outside the Gnutella network, using regular HTTP just like the Web.

1.4 Extending the Protocol


Servents MAY extend the protocol or even change parts of it

Yes, but I wish they wouldn't. The Gnutella packets appear simple, but then have really, really complicated extensions. If you want to extend the protocol, use a packet scheme that was designed with extension in mind: Gnutella2.