title: Java SSLSocket won't stay alive (HTTPS Persistent connection needed)
body: <p><br />
  I have written a Client-Server program using java Sockets and it works just fine. Now I'm trying to move on to HTTPS for communicating between client and server. <br />
  My code is based on java built-in Sockets (Socket and ServerSocket) and it works just fine. But when I use HTTPS Sockets (<b>SSLSocket</b> and <b>SSLServerSocket</b>) <b>without changing the rest of the code</b>, unfortunately won't work anymore. <br />
   <br />
  The program needs persistent connection between server and client to let them send and receive data for minutes. The problem seems to be that HTTPS connection has been closed in server or client side after first transaction has been completed. <br />
   <br />
  To be more precise, This is what happens: <br />
  1. Server creates a SSLServerSocket and calls "accept()" on it. <br />
  2. Client creates a SSLSocket and connects to the server. Then writes to server through "DataOutputStream" <br />
  3. Server reads the client through "DataInputStream" and sends back its response through "DataOutputStream". <br />
  4. Client reads the server through "DataInputStream". <br />
  Everything is OK till now! But after that when the client sends another stream, on the server side no data would be "available()" on the server through the same method used before. <br />
   <br />
  Is there a way to keep this connection alive? <br />
   <br />
  Tnx for ur helps in advance!</p>