SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWHttpsSecureSocketClient Class Reference

Handle class for parent RWHttpClient, providing implementation-specific details for HTTPS clients. More...

#include <rw/https/RWHttpsSecureSocketClient.h>

Inheritance diagram for RWHttpsSecureSocketClient:
RWHttpClient RWHandleBase

Public Member Functions

 RWHttpsSecureSocketClient ()
 
 RWHttpsSecureSocketClient (const RWHttpsSecureSocketClient &client)
 
virtual ~RWHttpsSecureSocketClient ()
 
RWHttpsSecureSocketClientoperator= (const RWHttpsSecureSocketClient &other)
 
bool secureUpgrade ()
 
- Public Member Functions inherited from RWHttpClient
 RWHttpClient (const RWHttpClient &client)
 
 RWHttpClient (void)
 
virtual ~RWHttpClient ()
 
void connect (const RWSockAddrBase &address, 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)
 
RWHttpReply getReply (unsigned long maxwait=0)
 
bool isConnected () const
 
RWHttpClientoperator= (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
 

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 (const RWHandleBase &second)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (void)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

RWHttpsSecureSocketClient is a derived handle class for RWHttpClient. It provides implementation specific details for HTTPS clients over SSL/TLS enabled sockets.

Constructor & Destructor Documentation

◆ RWHttpsSecureSocketClient() [1/2]

RWHttpsSecureSocketClient::RWHttpsSecureSocketClient ( )

Default constructor. Constructs an invalid handle.

◆ RWHttpsSecureSocketClient() [2/2]

RWHttpsSecureSocketClient::RWHttpsSecureSocketClient ( const RWHttpsSecureSocketClient & client)

Copy constructor.

◆ ~RWHttpsSecureSocketClient()

virtual RWHttpsSecureSocketClient::~RWHttpsSecureSocketClient ( )
virtual

Virtual destructor.

Member Function Documentation

◆ make() [1/2]

static RWHttpsSecureSocketClient RWHttpsSecureSocketClient::make ( const RWSecureSocketContext & context,
RWHttpsConnectionStart s,
const RWTFunctor< RWSocket(const RWSockAddrBase &, unsigned long)> & f )
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.

◆ make() [2/2]

static RWHttpsSecureSocketClient RWHttpsSecureSocketClient::make ( const RWSecureSocketContext & context,
RWHttpsConnectionStart s = RW_HTTPS_START_SECURE )
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.

◆ operator=()

RWHttpsSecureSocketClient & RWHttpsSecureSocketClient::operator= ( const RWHttpsSecureSocketClient & other)
inline

Assignment operator.

◆ secureUpgrade()

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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.