title: Python - SSLSocket.recv() only returns a single byte
body: <p>I'm trying to add SSL support for my program. I've used ssl.wrap_socket on non-blocking sockets to create an SSLSocket.</p>
  
  <p>Now I go to read from that socket...</p>
  
  <pre><code>try:
      data = sslsock.recv(4096)
  except socket.error as e:
      # error
      ...
  </code></pre>
  
  <p>Why do I only receive a single byte? I know that more than 1 byte is available.</p>
  
  <p>When I use this instead...</p>
  
  <pre><code>data = ''
  while 1:
          try:
              data += self.sock.recv(4096)
          except socket.error as e:
              if data:
                  break
              else:
                  # error
                  ...
  </code></pre>
  
  <p>The full string of bytes are returned. Before using wrap_socket, the full string of bytes were always returned from the recv call.</p>