SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Handle class for parent RWHttpClient, providing implementation-specific details for HTTPS clients. More...
#include <rw/https/RWHttpsSecureSocketClient.h>
Public Member Functions | |
RWHttpsSecureSocketClient () | |
RWHttpsSecureSocketClient (const RWHttpsSecureSocketClient &client) | |
virtual | ~RWHttpsSecureSocketClient () |
RWHttpsSecureSocketClient & | operator= (const RWHttpsSecureSocketClient &other) |
bool | secureUpgrade () |
Public Member Functions inherited from RWHttpClient | |
RWHttpClient (void) | |
RWHttpClient (const RWHttpClient &client) | |
virtual | ~RWHttpClient () |
void | connect (const RWSockAddrBase &address, unsigned long maxwait=0) |
RWHttpReply | getReply (unsigned long maxwait=0) |
RWHttpReply | getReply (RWTFunctor< void(RWPortal)> handler, unsigned long maxwait=0) |
RWHttpReply | getReply (RWTFunctor< void(RWPortal, RWHttpReply &)> handler, unsigned long maxwait=0) |
bool | isConnected () const |
RWHttpClient & | operator= (const RWHttpClient &other) |
bool | submit (RWHttpRequest request, RWHttpPipeline pl=RW_HTTP_FORBID_PIPELINING, unsigned long maxwait=0) |
Public Member Functions inherited from RWHandleBase | |
bool | isValid (void) const |
bool | operator!= (const RWHandleBase &second) const |
bool | operator< (const RWHandleBase &second) const |
bool | operator== (const RWHandleBase &second) const |
Static Public Member Functions | |
static RWHttpsSecureSocketClient | make (const RWSecureSocketContext &context, RWHttpsConnectionStart s, const RWTFunctor< RWSocket(const RWSockAddrBase &, unsigned long)> &f) |
static RWHttpsSecureSocketClient | make (const RWSecureSocketContext &context, RWHttpsConnectionStart s=RW_HTTPS_START_SECURE) |
Additional Inherited Members | |
Protected Member Functions inherited from RWHttpClient | |
RWHttpClient (RWHttpClientImp *imp) | |
RWHttpClientImp & | body () const |
Protected Member Functions inherited from RWHandleBase | |
RWHandleBase (void) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (const RWHandleBase &second) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
RWHttpsSecureSocketClient is a derived handle class for RWHttpClient. It provides implementation specific details for HTTPS clients over SSL/TLS enabled sockets.
RWHttpsSecureSocketClient::RWHttpsSecureSocketClient | ( | ) |
Default constructor. Constructs an invalid handle.
RWHttpsSecureSocketClient::RWHttpsSecureSocketClient | ( | const RWHttpsSecureSocketClient & | client | ) |
Copy constructor.
|
virtual |
Virtual destructor.
|
static |
Creates a new initialized RWHttpsSecureSocketClient. You must provide an initialized RWSecureSocketContext object. The RWHttpsConnectionStart parameter s determines whether the connection starts in secure mode (the default) or in insecure mode. If the RWHttpsConnectionStart parameter s is RW_HTTPS_START_SECURE, the connection starts in secure mode. If the RWHttpsConnectionStart parameter s is RW_HTTPS_START_INSECURE, the connection starts in insecure mode and waits until the secureUpgrade() member function is called before switching to secure mode.
The functor f is used by RWHttpClient::connect() to get a socket connected to the provided address.
You can use this function with the HTTP
CONNECT
method to connect insecurely to a proxy machine and establish a tunnel to a secure machine. After the tunnel is established, use secureUpgrade() to start communicating securely. For more information, see Section 8.2, "Using the HTTP CONNECT Method with the HTTPS Package," in the Secure Communication Module User's Guide.
|
static |
Creates a new initialized RWHttpsSecureSocketClient. You must provide an initialized RWSecureSocketContext object. The RWHttpsConnectionStart parameter s determines whether the connection starts in secure mode (the default) or in insecure mode. If the RWHttpsConnectionStart parameter s is RW_HTTPS_START_SECURE, the connection starts in secure mode. If the RWHttpsConnectionStart parameter s is RW_HTTPS_START_INSECURE, the connection starts in insecure mode and waits until the secureUpgrade() member function is called before switching to secure mode.
You can use this function with the HTTP
CONNECT
method to connect insecurely to a proxy machine and establish a tunnel to a secure machine. After the tunnel is established, use secureUpgrade() to start communicating securely. For more information, see Section 8.2, "Using the HTTP CONNECT Method with the HTTPS Package," in the Secure Communication Module User's Guide.
|
inline |
Assignment operator.
bool RWHttpsSecureSocketClient::secureUpgrade | ( | ) |
Begins secure communication on this connection. Returns true
on success. If the connection is already secure, simply returns true
. Returns false
on error.
Call this function only when the RWHttpsSecureSocketClient object starts with an insecure connection by passing RW_HTTPS_START_INSECURE as the second parameter to the static make() function.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |