title: Socket: Reading UDP Packet
body: <p>I've been searching about this question, but i couldn't understand the question since it was not really general, I wouldn't find the solution to read UDP packets that contain UTF-8 text for example.</p>
  
  <p>So i make a socket, that makes a UDP packet that contains UTF-8 text, and i send it like this:</p>
  
  <pre><code>import socket
  
  UDP_IP = "127.0.0.1"
  UDP_PORT = 80
  MESSAGE = "Hello, World!"
  
  sock = socket.socket(socket.AF_INET, 
               socket.SOCK_DGRAM) 
  sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
  </code></pre>
  
  <p>Lets define this as <code>sender.py</code>.</p>
  
  <p>Now i want to make a <code>reciever.py</code> script that will be executed after <code>sender.py</code>.</p>
  
  <p>How can i make that? I've heard of         <code>Data, addr = udp.recvfrom(1024)</code> but i'm not entirely sure how it works/how to use it.</p>
  
  <p>So whenever i execute them together, <code>Reciever.py</code> can print UTF-8 text of UDP packet sent.</p>