Client applications usually make many connections to the same server. For example, standard Web browsers might connect to a server to download the main Web page, and then connect several times simultaneously to download the images on the page. For each connection, the SSL/TLS protocol requires that the client and server execute the SSL Handshake protocol, which includes exchanging keys and certificates, and generating session keys.
If your application needs many SSL/TLS connections to the same server within a short time, the SSL/TLS protocol allows you to reuse a previous SSL/TLS session. A session is defined by connection parameters, including protocols and keys.
To attempt to reuse a session:
Extract the session from a connected RWSecureSocket or RWSecureSocketPortal with getSession().
This function returns an RWSecureSocketSession object that your application can store for later use (see RWSecureSocketSession in the SourcePro C++ API Reference Guide).
When your application attempts to reuse the session, it passes the RWSecureSocketSession object to the RWSecureSocket or RWSecureSocketPortal constructor or connect().
The server can refuse to reuse the session if:
the session is too old
the server's session cache filled up quickly and the session was removed
If your session cannot be reused, the protocol automatically renegotiates a new session without any intervention from your application. For more information, see the example in examples\secsock\manual\SessionReuseExample.cpp.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.