Discovery IP in connection
Djames Suhanko
djames.suhanko at gmail.com
Mon Jul 27 16:25:32 EDT 2009
Hello,all!
I wrote a little programa that listening UDP packets. A can receive
the messages, but I can't see the the origin IP.
How can I to get the remote IP address in connection?
My source:
#!/usr/bin/env python
import socket
mySocket = socket.socket ( socket.AF_INET, socket.SOCK_DGRAM )
mySocket.bind ( ( '', 514 ) )
data, addr = mySocket.recvfrom(100)
print data
--
Djames Suhanko
LinuxUser 158.760
More information about the Python-list
mailing list