title: UDP connection do not receive any reply from server - Python (potentially also c++ using boost)
body: <p>I am trying to establish a connection to a server, and send some data to it.. 
  The problem is that, if i try to debug the connection using this MICHAEL SIEGENTHALER | TCP/UDP Debugging Tools 
  which clearly shows that there is no issue with the communication, and even some form of random input will result in a data coming out. </p>
  
  <p>but when i try to code it in python, using the same settings, are no response received.. It stalls after it has sent the message, i am not sure whether whether it has send the message, or skipped it?</p>
  
  <p>It seems like my server aren't receiving the message i sent to it, and therefore don't reply.. but what is different?</p>
  
  <pre><code>import socket   #for sockets
  import sys  #for exit
  
  # create dgram udp socket
  try:
      s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  except socket.error:
      print ('Failed to create socket')
      sys.exit()
  
  host = 'localhost';
  port = 5634;
  
  while(1) :
      try :
          #Set the whole string
          s.sendto(("-1-117230").encode('utf-8'),('10.2.140.183', 9008))
          print("sent")
  
          # receive data from client (data, addr)
          d = s.recvfrom(1024)
          reply = d[0]
          addr = d[1]
  
          print ('Server reply : ' + reply)
  
      except socket.error as msg:
          print ('Error Code : ' + str(msg[0]) + ' Message ' + msg[1])
          sys.exit()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5jD17.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5jD17.png" alt="enter image description here"></a></p>
  
  <p>what is different from the code, and the way the debugging tool test it?</p>
  
  <p>I tried to code it in c++ using boost, but as i had the same issue, i went on to trying in python to see whether that would make a bit more sense. </p>
  
  <p>---Updated -- </p>
  
  <pre><code>import socket   #for sockets
  import sys  #for exit
  
  # create dgram udp socket
  try:
      s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      server_adress = ('10.2.140.183',5634)
      s.bind(server_adress)
  except socket.error:
      print ('Failed to create socket')
      sys.exit()
  
  
  while(1) :
      try :
          #Set the whole string
          s.sendto(("-1-117230").encode('utf-8'),('10.2.140.183', 9008))
          print("sent")
  
          # receive data from client (data, addr)
          d = s.recvfrom(1024)
          reply = d[0]
          addr = d[1]
  
          print ('Server reply : ' + reply)
  
      except socket.error as msg:
          print ('Error Code : ' + str(msg[0]) + ' Message ' + msg[1])
          sys.exit()
  </code></pre>