[Twisted-Python] Finding peers.
illumen at yahoo.com
Fri Jul 4 12:20:52 EDT 2003
Thomas Weholt ( PRIVAT ) wrote:
>I plan to start working on, or at least, I'm very interested in how to do
>Any information about this anyone can post to this list would be very
>Twisted to have a partial Gnutella-implementation so it might be usefull to
>look at. I'm thinking about using XML-RPC/SOAP, but it would involve a
>substantial amount of overhead.
>Anyway, it would be nice if you kept me or the list posted on your findings.
I've been thinking of some easy ways to do it which will meet my
requirements. They are different for internet ip addresses, and private
For internet addresses, I'm going to put up a few web pages. One to
register a server with, and another to list servers. These will be
master game lists, which all the players will connect to to.
For private addresses(eg 10.0.0., 192.168.0. etc) maybe I'll send a bit
of udp to the broadcast address. Which will be a message asking if
anyone is out there looking for a game. If the peer is looking for a
game, they'll connect to a pb service running on the client and tell it
they are interested in playing.
Once the peers have found each other, then they can decide if they want
to play, and negotiate who is going to be the server(I'll probably just
let it be a race of which one connects first is the client, since my
game is two player only).
On a slightly related note, I think firewall/nat detection is pretty
necessary in this process. For on the internet anyway. To make the
list of servers more reliable(it sucks waiting around for the connection
to time out). Any ways of detecting if a peer is behind a
firewall/nat? I was thinking of getting the peers to report any
connection timeout attempts. Also maybe have the master server try and
connect to the peers reporting to be master servers. So when they go to
list them selves as wanting a game, the master server will try a
connection, and list it as connectable/not connectable.
>----- Original Message -----
>From: "Rene Dudfield" <illumen at yahoo.com>
>To: <twisted-python at twistedmatrix.com>
>Sent: Friday, July 04, 2003 11:56 AM
>Subject: [Twisted-Python] Finding peers.
>>just wondering if anyone has/knows of any code to find peers on the
More information about the Twisted-Python