import socket
import sys

PORT = 9090 

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('', PORT))
 
while 1:
    data, addr = s.recvfrom(1024)
     
    if not data: 
        break
     
    print 'Message[' + addr[0] + ':' + str(addr[1]) + '] - ' + data.strip()

15fbd33dd36a3c57285e910b6ee44416df9ff190
import socket
import sys

PORT = 9090 

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('', PORT))
 
while 1:
    data, addr = s.recvfrom(1024)
     
    if not data: 
        break
     
    print 'Message[' + addr[0] + ':' + str(addr[1]) + '] - ' + data.strip()
