Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Secure Communication Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

5.6 Reusing Sessions

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:

  1. 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).

  2. 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:

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.



Previous fileTop of DocumentContentsIndex pageNext file

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.
Contact Rogue Wave about documentation or support issues.