from socket import socket, AF_INET, SOCK_DGRAM s = socket(AF_INET, SOCK_DGRAM) s.bind(('', 8090)) while True: d = s.recvfrom(1024) print(d)