I have a small application that spawns a number of ports (300 to be exact). When it spawns a socket it uses:
# when someone connects via socketlistener, do some stuff
class SocketListener((SocketServer.BaseRequestHandler)):
print "Do some stuff"
Is there a way to tell within SocketListener what port someone connected on?