title: Python program does not recieve response when connecting and sending data to SSL socket
body: <p>I am trying to connect to an SSL socket hosted on an external server, send data and the service should respond which is what I am attempting to capture.  However the program will wait for a response and then timeout.</p>
  
  <p>At a basic level I am trying to replicate the below openssl connection.  I am able to send a <code>ping</code> and the server responds <code>pong</code> so that I know everything is working.</p>
  
  <p><code>openssl s_client -quiet -connect server.server:443</code></p>
  
  <pre><code>import socket
  import ssl
  
  hostname = "server.server"
  context = ssl.create_default_context()
  
  with socket.create_connection((hostname, 4433)) as sock:
      sock.settimeout(5)
      with context.wrap_socket(sock, server_hostname=hostname) as ssock:
          print(ssock.version())
          ssock.send(b'ping')
          response = ssock.recv(1024)
          print(response)
      sock.close()
      print("SSL Socket Closed")
  </code></pre>