title: python create socket not receiving
body: <p>I have an IP = '127.0.0.1', port number 'port', and trying</p>
  
  <pre><code>class AClass(asyncore.dispatcher):
       def __init__(self, ip, port):        
          asyncore.dispatcher.__init__(self)
          self.create_socket(socket.AF_INET, socket.SOCK_STREAM)        
          self.connect((ip, port))
  
      def handle_connect(self):
          print 'connected'   
  
      def handle_read(self):        
          data = self.recv(8192)
          print data   
  
      def handle_close(self):
          self.close()
  </code></pre>
  
  <p>Nothing is being printed though.</p>
  
  <p>The sending is being handled by another process. How can I check ? Is the above correct ?</p>
  
  <p>Edit:
  For sending: a different python program, running separately:</p>
  
  <pre><code>sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  sock.connect((addr, port))
  packet="some string"
  sock.sendall(packet+'\r\n') 
  </code></pre>
  
  <p>Nothing happens</p>
  
  <p>If I put, on server side (!!!) <code>print sock.recv(4096)</code> I see the packet printed - but still nothing happens from the client side.</p>