import socket
from time import sleep

UDP_IP = "192.168.0.80"
UDP_PORT = 8080

sock = socket.socket(socket.AF_INET, # Internet
                     socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))
sock.setblocking(0)

while True:
	try:
		data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
		print "received message:", data
	except socket.error:
		sleep(1)
		print "Bacaneria"
sock.close()
