How do I get the external IP of a socket in Python? -


when call socket.getsockname() on socket object, returns tuple of machine's internal ip , port. however, retrieve external ip. what's cheapest, efficient manner of doing this?

this isn't possible without cooperation external server, because there number of nats between , other computer. if it's custom protocol, ask other system report address it's connected to.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -