I am using
in my current project which deals with client-authentification etc.. Currently it only prints out the clients address/port, so that I can check if one TCP-connection is used for multiple requests (
) or if a new connection is established for every request (and thus a new SSL-handshake is made every time). When I use FireFox to make multiple request against the server I can see that keep-alive is working. So the server part works fine with GET and POST-requests.
If I use
to make a request against the Server (in this case using no
works, too: Only one connection is established for multiple sequentially started requests.
But if I use
(using exactly the same code, but using
is not working anymore. So for each request a new connection is established, although I am using the same
// URL myUrl = ...
// SSLContext mySsl = ...
HttpsURLConnection conn = (HttpsURLConnection) myUrl.openConnection();
// send Data
// receive Data
How do I force
because many requests will lead to many SSL-handshakes which is a real performance issue?
Instead of calling
each time, I tried to cache the
. But nothing changed. The problem still exists.