title: I get an error when trying to receive data from the server in a python UDP socket using recvfrom()
body: <p>I get the error message: "OSError: [WinError 10022] An invalid argument was supplied" for the line: data, addr = sock.recvfrom(1024)</p>
  
  <p>Client Code:</p>
  
  <pre><code>def receive():
      sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      data, addr = sock.recvfrom(1024)
      print(data.decode('ascii'))
      sock.close()
      return data
  
  send('Connection Made')
  while True: receive()
  </code></pre>
  
  <p>It sends 'Connection Made' to the Server but then gives the error on receive()</p>