Advertisement
rjalic

vj3_server.py

Nov 15th, 2019
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import socket
  2.  
  3. UDP_IP = ""
  4. UDP_PORT = 5005
  5.  
  6. sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  7. sock.bind((UDP_IP, UDP_PORT))
  8.  
  9. while True:
  10.   data, addr = sock.recvfrom(1024)
  11.   print("received:", data.decode())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement