SimpleXMLRPCServer and socket
jujucece at gmail.com
Mon Sep 25 20:20:38 CEST 2006
First, sorry for my poor English !
I used the SimpleXMLRPCServer facility of Python to develop a
multithread-server, here's part of my code :
def __init__(self, addr):
def _dispatch(self, method, params):
if method == "toto58":
The problem I have, is I don't know how to get the port used by the
remote host ?
I tried to get this information with the socket object of the Server,
but this socket always correspond to the LISTENING socket and not the
ESTABLISHED one ! (With the lsof command, I see 2 connexions 1 LISTEN
and 1 ESTABLISHED).
So, when I tried to getpeername() on this object, I've an Exception
(107, 'Transport endpoint is not connected'), which is normal for a
How can I get the socket object corresponding to the ESTABLISHED
connexion ? (Or how can I do to get the port of the remote host ?)
Thanks in advance...
More information about the Python-list