title: Python 3 - verify sendto() Success
body: <p>I have 2 UDP responses to a destination ip, one right after the other:</p>
  
  <pre><code>sendsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
  sendsock.bind(('%s' % ip_adr, 1036))
  
  #send first packet
  ok_response = "Reception Success, more to come"
  str2bytes = bytes(ok_response,'utf-8')
  sendsock.sendto(str2bytes, ("%s" % phone.ip_addr, int(phone.sip_port)))
  
  #send second packet
  ok_response = "Fun data here"
  str2bytes = bytes(ok_response,'utf-8')
  sendsock.sendto(str2bytes, ("%s" % phone.ip_addr, int(phone.sip_port)))
  </code></pre>
  
  <p>I can see with Wireshark the second packet gets sent. But the first seems be ignored.</p>
  
  <p>Unless someone can see a hiccup in my code, is there a way to do an if statement on each <code>sendsock.sendto()</code> instance, to ensure the code doesn't continue until it's acknowledged as sent?</p>
  
  <p>Also, should I be closing the sendsock? </p>