tags:

views:

53

answers:

1

I wanna learn how to build a p2p application in python that conforms to the gnutella protocol so it can tap-in the existing network like limewire, etc.

Any body who knows something where to start or a ste-by-step guide? I've been reading the http://wiki.limewire.org/index.php?title=GDF but I need something with an example so I can easily follow.

A: 

First of all: read the protocol specification carefully

There are multiple python Gnutella implementations, I was able to find at least the following with quick googling: Quack, gnuppy. Check their source code for reference.

The python modules you might find helpful with protocol packet decoding and message parsing are struct and re. You might also need to implement some sort of Finite State Machine to keep track of various exchanges.

Kimvais
thanks for the fast reply. I think I need to understand very well the protocol first, only then will I appreciate the code.
Marconi