title: How could socket.recv(256) return None?
body: <p>Having 2 python programs , <code>host1.py</code> and <code>host2.py</code>  which run simultaneously and communicate via <code>socket</code> such that -</p>
  
  <p><code>host1.py</code> has <code>reciveSock = socket(AF_INET,SOCK_DGRAM)</code> </p>
  
  <p>and <code>host2.py</code> has <code>sendSocket = socket(AF_INET,SOCK_DGRAM)</code> .</p>
  
  <p>Both the socket's are binding each other  .</p>
  
  <p>At <code>host1.py</code> has  -</p>
  
  <pre><code>try:
      msgBacked = reciveSock.recv(256)
  except:
      pass
  if( msgBacked is None):
      print "isNone!"
  </code></pre>
  
  <p>And indeed it prints <code>isNone!</code> mean <code>msgBacked</code> is a <code>None</code>  . </p>
  
  <p>All the send's from <code>host2.py</code> to <code>host1.py</code> are in a type <code>sendSocket.send("ACK")</code> so that there is a value in the sent string which tranported to <code>host1.py</code> . </p>
  
  <p>So how this <code>msgBacked</code> could be <code>None</code> ? </p>