title: Python - UDP socket bind() to the correct address
body: <p>I can't understand why if I create a socket in this way</p>
  
  <pre><code>from socket import *
  s = socket(AF_INET, SOCK_DGRAM)
  s.bind(("192.168.1.10",26000))
  print s.recvfrom(4096)[0]
  </code></pre>
  
  <p>and I try to send to it a broadcast packet like this</p>
  
  <pre><code>from socket import *
  s = socket(AF_INET, SOCK_DGRAM)
  s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
  s.sendto("hey!", ("&lt;broadcast&gt;", 26000))
  </code></pre>
  
  <p>it doesn't work (it hangs on the recvfrom()) but if I try to bind it to "0.0.0.0" it receives the packet correctly.</p>
  
  <p>I know that 0.0.0.0 means that every address on every interface will be listening on that port, but why binding directly to an address makes it don't receive the packet?</p>
  
  <p><strong>Operating system: OSX 10.9.2, Python version: 2.7.6</strong></p>
  
  <p>Even if I'm not running Linux, I tried binding the socket to the subnet broadcast address anyway, same results.</p>