title: Python s.recv() returns empty string
body: <p>I've got a simple client and server I found on an online tutorial</p>
  
  <hr>
  
  <pre><code>#server.py        
  
  import socket               # Import socket module
  
  s = socket.socket()         # Create a socket object
  host = 'localhost' # Get local machine name
  port = 12345                # Reserve a port for your service.
  s.bind((host, port))        # Bind to the port  
  s.listen(5)                 # Now wait for client connection.
  while True:
     c, addr = s.accept()     # Establish connection with client.
     print 'Got connection from', addr
     c.send('Thank you for connecting')
     c.close()                # Close the connection
  </code></pre>
  
  <hr>
  
  <pre><code>#client           # This is client.py file
  
  import socket               # Import socket module
  
  s = socket.socket()         # Create a socket object
  host = 'localhost' 
  port = 12345                # Reserve a port for your service.
  
  s.connect((host, port))
  print s.recv(1024)
  s.close                     # Close the socket when done
  </code></pre>
  
  <hr>
  
  <p>When I run my c<code>lient.py</code> all it does is print an empty string when it should print ('Thank you for connecting'). When I connect localhost 12345 from telnet it sends the message  fine so I don't know why my client isn't receiving the message</p>
  
  <p>Any thoughts. I'm very new to socket programming and would love to find a solution so I can move on.</p>