[Twisted-Python] Socket number

Federico 'Derfel' Stella derfel at alessandria.linux.it
Sun Jun 10 08:20:32 EDT 2007

* Sunday 10 June 2007, alle 11:26, Simon Pickles scrive:

> In my C++ game server, I used the socket number as the temporary ID of
> the connected player. Is there anyway to retrieve the socket number of a
> new player?

> Atm, I am just using self.transport.getPeer().host, but this is only the
> IP address, not socket.

.getHandle() returns a normal socket object from which you could get socket

Just for curiosity, are your players anonymous (e.g. not registered)?

More information about the Twisted-Python mailing list