Remote Call Framework 3.4
RCF::ClientStub Class Reference

Controls the client side of a RCF connection. More...

#include <ClientStub.hpp>

Inherits RCF::ClientTransportCallback, and enable_shared_from_this< ClientStub >.

Public Member Functions

Transport layer

This section describes functions relating to the transport layer of a ClientStub. The transport layer encapsulates the physical network connection used by a ClientStub instance to communicate with the server.

void setServerEndpoint (const Endpoint &endpoint)
 Sets the network endpoint at which the RCF server is located. More...
 
void setServerEndpoint (EndpointPtr endpointPtr)
 Sets the network endpoint at which the RCF server is located. More...
 
EndpointPtr getServerEndpoint () const
 Gets the network endpoint at which the RCF server is located. More...
 
void setTransport (ClientTransportUniquePtr transport)
 Replaces the client transport for this ClientStub. More...
 
ClientTransportgetTransport ()
 Returns a reference to the client transport of this ClientStub. More...
 
IpClientTransportgetIpTransport ()
 Returns a reference to the client transport of this ClientStub, as an IpClientTransport reference. Throws if the client transport is not IP-based. More...
 
ClientTransportUniquePtr releaseTransport ()
 Releases the client transport from this ClientStub. More...
 
TransportType getTransportType ()
 Gets the client transport type. More...
 
void connect ()
 Establishes a network connection to the server. More...
 
void disconnect ()
 Disconnects from the server. More...
 
bool isConnected ()
 Gets a boolean value indicating if the ClientStub has been connected. More...
 
FutureConverter< Void > ping ()
 Makes a two-way ping call to the RCF server. More...
 
void setAutoReconnect (bool autoReconnect)
 Sets whether automatic network re-connection is enabled. More...
 
bool getAutoReconnect () const
 Gets whether automatic network re-connection is enabled. More...
 
void setConnectTimeoutMs (unsigned int connectTimeoutMs)
 Sets the connect timeout. More...
 
unsigned int getConnectTimeoutMs () const
 Gets the connect timeout. More...
 
Transport protocol settings

This section describes functions relating to the transport protocol of the client. Transport protocols are used to encrypt communication over the transport layer.

void setTransportProtocol (TransportProtocol protocol)
 Sets the transport protocol. More...
 
TransportProtocol getTransportProtocol () const
 Gets the transport protocol. More...
 
void setUserName (const tstring &username)
 Sets the user name to use for authenticating to the server. More...
 
tstring getUserName () const
 Gets the user name to use when authenticating to the server. More...
 
void setPassword (const tstring &password)
 Sets the password to use when authenticating to the server. More...
 
tstring getPassword () const
 Gets the password to use when authenticating to the server. More...
 
void setKerberosSpn (const tstring &kerberosSpn)
 Sets the Kerberos SPN to use when authenticating to the server. More...
 
tstring getKerberosSpn () const
 Gets the Kerberos SPN to use when authenticating to the server. More...
 
void setEnableCompression (bool enableCompression)
 Sets whether compression is enabled for this connection. More...
 
bool getEnableCompression () const
 Gets whether compression is enabled for this connection. More...
 
void setSspiMessageProtection (SspiMessageProtection sspiMessageProtection)
 Sets the protection level for messages sent using the Kerberos, NTLM and Negotiate transport protocols. More...
 
SspiMessageProtection getSspiMessageProtection () const
 Gets the protection level for messages sent using the Kerberos, NTLM and Negotiate transport protocols. More...
 
Remote call settings

This section describes functions relating to performing remote calls on a server.

const std::string & getInterfaceName ()
 Gets the RCF interface name of the RCF client. More...
 
RemoteCallMode getRemoteCallMode () const
 Gets the remote call mode. More...
 
void setRemoteCallMode (RemoteCallMode defaultCallingSemantics)
 Sets the remote call mode. More...
 
void setSerializationProtocol (SerializationProtocol protocol)
 Sets the remote call serialization protocol. More...
 
SerializationProtocol getSerializationProtocol () const
 Gets the remote call serialization protocol. More...
 
void setEnableSfPointerTracking (bool enable)
 Sets pointer tracking mode when using SF serialization. More...
 
bool getEnableSfPointerTracking () const
 Gets pointer tracking mode when using SF serialization. More...
 
void setAutoVersioning (bool autoVersioning)
 Sets the auto-versioning property. More...
 
bool getAutoVersioning () const
 Gets the auto-versioning property. More...
 
void setRuntimeVersion (std::uint32_t version)
 Sets the RCF runtime version of this ClientStub. More...
 
std::uint32_t getRuntimeVersion () const
 Gets the RCF runtime version of this ClientStub. More...
 
void setArchiveVersion (std::uint32_t version)
 Sets the archive version of this ClientStub. More...
 
std::uint32_t getArchiveVersion () const
 Gets the archive version in use by this ClientStub. More...
 
void setPingBackIntervalMs (int pingBackIntervalMs)
 Sets the ping-back interval. More...
 
int getPingBackIntervalMs ()
 Gets the ping-back interval. More...
 
void setRemoteCallTimeoutMs (unsigned int remoteCallTimeoutMs)
 Sets the remote call timeout. More...
 
unsigned int getRemoteCallTimeoutMs () const
 Gets the remote call timeout. More...
 
void setRemoteCallProgressCallback (RemoteCallProgressCallback progressCallback, std::uint32_t callbackIntervalMs)
 
File transfers

Small files can be sent or received as part of regular remote call. For large (or potentially large) files, RCF provides specialized upload and download functionality.

void downloadFile (const std::string &downloadId, const Path &downloadPath, FileTransferOptions *pOptions=NULL)
 Downloads a file from a RcfServer. The download must already have been configured by the server, using RcfSession::configureDownload(). downloadPath can be either a directory or a file. If it is a directory, the file name will be set by the server. More...
 
void uploadFile (std::string &uploadId, const Path &uploadPath, FileTransferOptions *pOptions=NULL)
 Uploads a file to a RcfServer. The RcfServer must previously have enabled uploads and configured an upload directory. The upload ID must be empty, or a valid UUID. If it is empty, the server will generate a UUID and return it. More...
 
Custom request/response user data

The application data in a remote call is normally carried in the parameters of the remote call itself. RCF also allows you to add untyped custom data to the remote call request and response.

void setRequestUserData (const std::string &userData)
 Sets application-specific data associated with the RCF request. More...
 
std::string getRequestUserData ()
 Gets application-specific data associated with the RCF request. More...
 
void setResponseUserData (const std::string &userData)
 Sets application-specific data associated with the RCF response. More...
 
std::string getResponseUserData ()
 Gets application-specific data associated with the RCF response. More...
 
SSL settings

This section describes functions relating to usage of SSL, either as part of an HTTPS connection, or when using a SSL transport protocol.

void setCertificate (CertificatePtr certificatePtr)
 Sets the certificate to use when authenticating to a SSL server. More...
 
CertificatePtr getCertificate () const
 Gets the certificate to use when authenticating to a SSL server. More...
 
void setCaCertificate (CertificatePtr certificatePtr)
 Sets the certificate authority certificate to use when validating certificates from a SSL server. Not applicable to Schannel-based SSL. More...
 
CertificatePtr getCaCertificate () const
 Gets the certificate authority certificate to use when validating certificates from a SSL server. Not applicable to Schannel-based SSL. More...
 
void setOpenSslCipherSuite (const std::string &cipherSuite)
 Sets the cipher suite to use when establishing an SSL connection. Only applicable to OpenSSL-based SSL. More...
 
std::string getOpenSslCipherSuite () const
 Gets the cipher suite to use when establishing an SSL connection. Only applicable to OpenSSL-based SSL. More...
 
void setEnableSchannelCertificateValidation (const tstring &peerName)
 Sets the certificate name to match against, when validating a server certificate. Only applicable to Schannel-based SSL. More...
 
tstring getEnableSchannelCertificateValidation () const
 Gets the certificate name to match against, when validating a server certificate. Only applicable to Schannel-based SSL. More...
 
void setCertificateValidationCallback (CertificateValidationCallback certificateValidationCb)
 Sets the certificate validation callback. More...
 
const CertificateValidationCallbackgetCertificateValidationCallback () const
 Gets the certificate validation callback. More...
 
void setTlsSniName (const tstring &serverName)
 
tstring getTlsSniName () const
 
void setSslImplementation (SslImplementation sslImplementation)
 Sets the SSL implementation in use by this ClientStub (OpenSSL or Schannel). More...
 
SslImplementation getSslImplementation () const
 Gets the SSL implementation in use by this ClientStub (OpenSSL or Schannel). More...
 
Message batching

This section describes functions relating to message batching. Message batching is a variant of one-way messaging, where multiple one-way messages are accumulated until manually flushed, or the maximum batch length is reached.

void enableBatching ()
 Enables batch mode. More...
 
void disableBatching (bool flush=true)
 Disables batch mode, optionally flushing the last batch. More...
 
void flushBatch (unsigned int timeoutMs=0)
 Flushes the current batch of messages. More...
 
void setMaxBatchMessageLength (std::uint32_t maxBatchMessageLength)
 Sets the maximum message length of a batch of messages. More...
 
std::uint32_t getMaxBatchMessageLength ()
 Gets the maximum message length of a batch of messages. More...
 
std::uint32_t getBatchesSent ()
 Gets the number of batches sent since batch mode was enabled. More...
 
std::uint32_t getMessagesInCurrentBatch ()
 Gets the number of messages accumulated in the current batch. More...
 
Asynchronous calls

This section describes functions related to asynchronous remote calls. To make an asynchronous remote call, at least one parameter or return type of a remote call must be a Future instance.

void connectAsync (std::function< void()> onCompletion)
 Establishes a network connection to the server asynchronously. More...
 
bool ready ()
 Returns true if an asynchronous call is ready. More...
 
void waitForReady (std::uint32_t timeoutMs=0)
 Waits until an asynchronous call is ready. More...
 
void cancel ()
 Cancels an asynchronous call. More...
 
bool hasAsyncException ()
 Tests if an asynchronous call has resulted in an exception. More...
 
std::unique_ptr< ExceptiongetAsyncException ()
 Retrieves an asynchronous exception. More...
 

HTTP settings

RCF allows you to tunnel remote calls through a HTTP or HTTPS connection. This section describes functions relating to HTTP and HTTPS based connections.

HttpRedirectHandler mHttpRedirectHandler
 
void setHttpProxy (const std::string &httpProxy)
 Sets the HTTP proxy to use for HTTP/HTTPS connections. More...
 
std::string getHttpProxy () const
 Gets the HTTP proxy to use for HTTP/HTTPS connections. More...
 
void setHttpProxyPort (int httpProxyPort)
 Sets the HTTP proxy port to use for HTTP/HTTPS connections. More...
 
int getHttpProxyPort () const
 Gets the HTTP proxy port to use for HTTP/HTTPS connections. More...
 
void setHttpProxyUserName (const tstring &proxyUsername)
 Sets the user name to use when authenticating to an HTTP proxy. More...
 
tstring getHttpProxyUserName () const
 Gets the user name to use when authenticating to an HTTP proxy. More...
 
void setHttpProxyPassword (const tstring &proxyPassword)
 Sets the password to use when authenticating to an HTTP proxy. More...
 
tstring getHttpProxyPassword () const
 Gets the password to use when authenticating to an HTTP proxy. More...
 
void setHttpProxyRealm (const tstring &proxyRealm)
 Sets the realm value to use when authenticating to an HTTP proxy. More...
 
tstring getHttpProxyRealm () const
 Gets the realm value to use when authenticating to an HTTP proxy. More...
 
void setHttpCookies (const std::vector< HttpCookie > &cookies)
 Sets a list of cookies to include in HTTP requests to the server. More...
 
std::vector< HttpCookiegetHttpCookies () const
 Gets a list of cookies that have been returned as part of HTTP responses. More...
 
void clearHttpCookies ()
 Clears the list of cookies to include in HTTP requests to the server. More...
 
void setHttpRedirectHandler (HttpRedirectHandler redirectHandler)
 Sets the redirect handler, to be called when the client receives a HTTP redirect response. More...
 
HttpRedirectHandler getHttpRedirectHandler () const
 Gets the redirect handler. More...
 
void setHttpUrlParameterString (const std::string &urlParameterString)
 Sets the URL parameter string to append to the server URL when making a HTTP request. More...
 
std::string getHttpUrlParameterString () const
 Gets the URL parameter string to append to the server URL when making a HTTP request. More...
 
void setHttpMessageVerifier (HttpMessageVerifierPtr verifierPtr)
 Sets the HTTP message verification mechanism to use for HTTP connections. More...
 
HttpMessageVerifierPtr getHttpMessageVerifier () const
 Gets the HTTP message verification mechanism to use for HTTP connections. More...
 
void getHttpFrameInfo (std::string &responseLine, std::vector< std::pair< std::string, std::string > > &headers)
 
void setHttpConnectionCloseHeader (bool connectionClose)
 Sets a value indicating if the next message to the server should set the HTTP 'Connection' header to 'Close'. More...
 
bool getHttpConnectionCloseHeader () const
 Gets a value indicating if the next message to the server should set the HTTP 'Connection' header to 'Close'. More...
 

Detailed Description

Controls the client side of a RCF connection.

ClientStub is normally accessed through the RcfClient<>::getClientStub() function.

Member Function Documentation

◆ setServerEndpoint() [1/2]

void RCF::ClientStub::setServerEndpoint ( const Endpoint endpoint)

Sets the network endpoint at which the RCF server is located.

◆ setServerEndpoint() [2/2]

void RCF::ClientStub::setServerEndpoint ( EndpointPtr  endpointPtr)

Sets the network endpoint at which the RCF server is located.

◆ getServerEndpoint()

EndpointPtr RCF::ClientStub::getServerEndpoint ( ) const

Gets the network endpoint at which the RCF server is located.

◆ setTransport()

void RCF::ClientStub::setTransport ( ClientTransportUniquePtr  transport)

Replaces the client transport for this ClientStub.

◆ getTransport()

ClientTransport& RCF::ClientStub::getTransport ( )

Returns a reference to the client transport of this ClientStub.

◆ getIpTransport()

IpClientTransport& RCF::ClientStub::getIpTransport ( )

Returns a reference to the client transport of this ClientStub, as an IpClientTransport reference. Throws if the client transport is not IP-based.

◆ releaseTransport()

ClientTransportUniquePtr RCF::ClientStub::releaseTransport ( )

Releases the client transport from this ClientStub.

◆ getTransportType()

TransportType RCF::ClientStub::getTransportType ( )

Gets the client transport type.

◆ connect()

void RCF::ClientStub::connect ( )

Establishes a network connection to the server.

◆ disconnect()

void RCF::ClientStub::disconnect ( )

Disconnects from the server.

◆ isConnected()

bool RCF::ClientStub::isConnected ( )

Gets a boolean value indicating if the ClientStub has been connected.

◆ ping()

FutureConverter<Void> RCF::ClientStub::ping ( )

Makes a two-way ping call to the RCF server.

◆ setAutoReconnect()

void RCF::ClientStub::setAutoReconnect ( bool  autoReconnect)

Sets whether automatic network re-connection is enabled.

If this setting is enabled, when making a call, the RCF client will automatically reconnect if it discovers there has been a network disconnection. In some situations this may not be desirable, as your application may have custom logic, for example some type of login call, that needs to run when a connection is established.

◆ getAutoReconnect()

bool RCF::ClientStub::getAutoReconnect ( ) const

Gets whether automatic network re-connection is enabled.

◆ setConnectTimeoutMs()

void RCF::ClientStub::setConnectTimeoutMs ( unsigned int  connectTimeoutMs)

Sets the connect timeout.

The connect timeout only applies to the establishment of a physical network connection to the server. To set timeouts related to the execution of a remote call, see setRemoteCallTimeoutMs().

◆ getConnectTimeoutMs()

unsigned int RCF::ClientStub::getConnectTimeoutMs ( ) const

Gets the connect timeout.

◆ setTransportProtocol()

void RCF::ClientStub::setTransportProtocol ( TransportProtocol  protocol)

Sets the transport protocol.

◆ getTransportProtocol()

TransportProtocol RCF::ClientStub::getTransportProtocol ( ) const

Gets the transport protocol.

◆ setUserName()

void RCF::ClientStub::setUserName ( const tstring &  username)

Sets the user name to use for authenticating to the server.

Only applicable to transport protocols that need a user name.

◆ getUserName()

tstring RCF::ClientStub::getUserName ( ) const

Gets the user name to use when authenticating to the server.

◆ setPassword()

void RCF::ClientStub::setPassword ( const tstring &  password)

Sets the password to use when authenticating to the server.

Only applicable to transport protocols that need a password.

◆ getPassword()

tstring RCF::ClientStub::getPassword ( ) const

Gets the password to use when authenticating to the server.

◆ setKerberosSpn()

void RCF::ClientStub::setKerberosSpn ( const tstring &  kerberosSpn)

Sets the Kerberos SPN to use when authenticating to the server.

◆ getKerberosSpn()

tstring RCF::ClientStub::getKerberosSpn ( ) const

Gets the Kerberos SPN to use when authenticating to the server.

◆ setEnableCompression()

void RCF::ClientStub::setEnableCompression ( bool  enableCompression)

Sets whether compression is enabled for this connection.

Compression requires zlib and RCF_FEATURE_ZLIB=1 to be defined.

◆ getEnableCompression()

bool RCF::ClientStub::getEnableCompression ( ) const

Gets whether compression is enabled for this connection.

◆ setSspiMessageProtection()

void RCF::ClientStub::setSspiMessageProtection ( SspiMessageProtection  sspiMessageProtection)

Sets the protection level for messages sent using the Kerberos, NTLM and Negotiate transport protocols.

◆ getSspiMessageProtection()

SspiMessageProtection RCF::ClientStub::getSspiMessageProtection ( ) const

Gets the protection level for messages sent using the Kerberos, NTLM and Negotiate transport protocols.

◆ getInterfaceName()

const std::string& RCF::ClientStub::getInterfaceName ( )

Gets the RCF interface name of the RCF client.

◆ getRemoteCallMode()

RemoteCallMode RCF::ClientStub::getRemoteCallMode ( ) const

Gets the remote call mode.

◆ setRemoteCallMode()

void RCF::ClientStub::setRemoteCallMode ( RemoteCallMode  defaultCallingSemantics)

Sets the remote call mode.

◆ setSerializationProtocol()

void RCF::ClientStub::setSerializationProtocol ( SerializationProtocol  protocol)

Sets the remote call serialization protocol.

◆ getSerializationProtocol()

SerializationProtocol RCF::ClientStub::getSerializationProtocol ( ) const

Gets the remote call serialization protocol.

◆ setEnableSfPointerTracking()

void RCF::ClientStub::setEnableSfPointerTracking ( bool  enable)

Sets pointer tracking mode when using SF serialization.

◆ getEnableSfPointerTracking()

bool RCF::ClientStub::getEnableSfPointerTracking ( ) const

Gets pointer tracking mode when using SF serialization.

◆ setAutoVersioning()

void RCF::ClientStub::setAutoVersioning ( bool  autoVersioning)

Sets the auto-versioning property.

If auto-versioning is enabled, the RCF client will automatically adjust the RCF runtime version Auto-versioning is enabled by default.

◆ getAutoVersioning()

bool RCF::ClientStub::getAutoVersioning ( ) const

Gets the auto-versioning property.

◆ setRuntimeVersion()

void RCF::ClientStub::setRuntimeVersion ( std::uint32_t  version)

Sets the RCF runtime version of this ClientStub.

The RCF runtime version controls the behavior of RCF client and server runtimes. Adjustments to the RCF runtime version are normally made automatically (see setAutoVersioning()), and allow interoperability between newer and older RCF builds. However, in some cases it may be desirable to set the runtime version explicitly.

◆ getRuntimeVersion()

std::uint32_t RCF::ClientStub::getRuntimeVersion ( ) const

Gets the RCF runtime version of this ClientStub.

◆ setArchiveVersion()

void RCF::ClientStub::setArchiveVersion ( std::uint32_t  version)

Sets the archive version of this ClientStub.

The archive version is used to control the serialization format changes that you make to your application data structures over time.

◆ getArchiveVersion()

std::uint32_t RCF::ClientStub::getArchiveVersion ( ) const

Gets the archive version in use by this ClientStub.

◆ setPingBackIntervalMs()

void RCF::ClientStub::setPingBackIntervalMs ( int  pingBackIntervalMs)

Sets the ping-back interval.

The ping-back interval controls how often the RCF server will ping the RCF client, while a remote call is executing on the server.

◆ getPingBackIntervalMs()

int RCF::ClientStub::getPingBackIntervalMs ( )

Gets the ping-back interval.

◆ setRemoteCallTimeoutMs()

void RCF::ClientStub::setRemoteCallTimeoutMs ( unsigned int  remoteCallTimeoutMs)

Sets the remote call timeout.

This setting determines how long a RCF client will wait for a remote call to finish executing on the server.

◆ getRemoteCallTimeoutMs()

unsigned int RCF::ClientStub::getRemoteCallTimeoutMs ( ) const

Gets the remote call timeout.

◆ setRemoteCallProgressCallback()

void RCF::ClientStub::setRemoteCallProgressCallback ( RemoteCallProgressCallback  progressCallback,
std::uint32_t  callbackIntervalMs 
)

Sets the remote progress callback. The remote call progress callback will be called at the specified time interval while a remote call is in progress.

◆ downloadFile()

void RCF::ClientStub::downloadFile ( const std::string &  downloadId,
const Path downloadPath,
FileTransferOptions pOptions = NULL 
)

Downloads a file from a RcfServer. The download must already have been configured by the server, using RcfSession::configureDownload(). downloadPath can be either a directory or a file. If it is a directory, the file name will be set by the server.

◆ uploadFile()

void RCF::ClientStub::uploadFile ( std::string &  uploadId,
const Path uploadPath,
FileTransferOptions pOptions = NULL 
)

Uploads a file to a RcfServer. The RcfServer must previously have enabled uploads and configured an upload directory. The upload ID must be empty, or a valid UUID. If it is empty, the server will generate a UUID and return it.

◆ setRequestUserData()

void RCF::ClientStub::setRequestUserData ( const std::string &  userData)

Sets application-specific data associated with the RCF request.

◆ getRequestUserData()

std::string RCF::ClientStub::getRequestUserData ( )

Gets application-specific data associated with the RCF request.

◆ setResponseUserData()

void RCF::ClientStub::setResponseUserData ( const std::string &  userData)

Sets application-specific data associated with the RCF response.

◆ getResponseUserData()

std::string RCF::ClientStub::getResponseUserData ( )

Gets application-specific data associated with the RCF response.

◆ setHttpProxy()

void RCF::ClientStub::setHttpProxy ( const std::string &  httpProxy)

Sets the HTTP proxy to use for HTTP/HTTPS connections.

◆ getHttpProxy()

std::string RCF::ClientStub::getHttpProxy ( ) const

Gets the HTTP proxy to use for HTTP/HTTPS connections.

◆ setHttpProxyPort()

void RCF::ClientStub::setHttpProxyPort ( int  httpProxyPort)

Sets the HTTP proxy port to use for HTTP/HTTPS connections.

◆ getHttpProxyPort()

int RCF::ClientStub::getHttpProxyPort ( ) const

Gets the HTTP proxy port to use for HTTP/HTTPS connections.

◆ setHttpProxyUserName()

void RCF::ClientStub::setHttpProxyUserName ( const tstring &  proxyUsername)

Sets the user name to use when authenticating to an HTTP proxy.

◆ getHttpProxyUserName()

tstring RCF::ClientStub::getHttpProxyUserName ( ) const

Gets the user name to use when authenticating to an HTTP proxy.

◆ setHttpProxyPassword()

void RCF::ClientStub::setHttpProxyPassword ( const tstring &  proxyPassword)

Sets the password to use when authenticating to an HTTP proxy.

◆ getHttpProxyPassword()

tstring RCF::ClientStub::getHttpProxyPassword ( ) const

Gets the password to use when authenticating to an HTTP proxy.

◆ setHttpProxyRealm()

void RCF::ClientStub::setHttpProxyRealm ( const tstring &  proxyRealm)

Sets the realm value to use when authenticating to an HTTP proxy.

◆ getHttpProxyRealm()

tstring RCF::ClientStub::getHttpProxyRealm ( ) const

Gets the realm value to use when authenticating to an HTTP proxy.

◆ setHttpCookies()

void RCF::ClientStub::setHttpCookies ( const std::vector< HttpCookie > &  cookies)

Sets a list of cookies to include in HTTP requests to the server.

Cookies can be used to implement session affinity when connecting to a server farm through HTTP routing infrastructure. When remote calls are passed through server-side HTTP routing infrastructure, cookies may be returned, indicating session affinity information. By retrieving these cookies and applying them to a several RcfClient<> instances, multiple clients can be made to connect to the same back-end server.

◆ getHttpCookies()

std::vector<HttpCookie> RCF::ClientStub::getHttpCookies ( ) const

Gets a list of cookies that have been returned as part of HTTP responses.

◆ clearHttpCookies()

void RCF::ClientStub::clearHttpCookies ( )

Clears the list of cookies to include in HTTP requests to the server.

◆ setHttpRedirectHandler()

void RCF::ClientStub::setHttpRedirectHandler ( HttpRedirectHandler  redirectHandler)

Sets the redirect handler, to be called when the client receives a HTTP redirect response.

◆ getHttpRedirectHandler()

HttpRedirectHandler RCF::ClientStub::getHttpRedirectHandler ( ) const

Gets the redirect handler.

◆ setHttpUrlParameterString()

void RCF::ClientStub::setHttpUrlParameterString ( const std::string &  urlParameterString)

Sets the URL parameter string to append to the server URL when making a HTTP request.

◆ getHttpUrlParameterString()

std::string RCF::ClientStub::getHttpUrlParameterString ( ) const

Gets the URL parameter string to append to the server URL when making a HTTP request.

◆ setHttpMessageVerifier()

void RCF::ClientStub::setHttpMessageVerifier ( HttpMessageVerifierPtr  verifierPtr)

Sets the HTTP message verification mechanism to use for HTTP connections.

◆ getHttpMessageVerifier()

HttpMessageVerifierPtr RCF::ClientStub::getHttpMessageVerifier ( ) const

Gets the HTTP message verification mechanism to use for HTTP connections.

◆ setHttpConnectionCloseHeader()

void RCF::ClientStub::setHttpConnectionCloseHeader ( bool  connectionClose)

Sets a value indicating if the next message to the server should set the HTTP 'Connection' header to 'Close'.

◆ getHttpConnectionCloseHeader()

bool RCF::ClientStub::getHttpConnectionCloseHeader ( ) const

Gets a value indicating if the next message to the server should set the HTTP 'Connection' header to 'Close'.

◆ setCertificate()

void RCF::ClientStub::setCertificate ( CertificatePtr  certificatePtr)

Sets the certificate to use when authenticating to a SSL server.

◆ getCertificate()

CertificatePtr RCF::ClientStub::getCertificate ( ) const

Gets the certificate to use when authenticating to a SSL server.

◆ setCaCertificate()

void RCF::ClientStub::setCaCertificate ( CertificatePtr  certificatePtr)

Sets the certificate authority certificate to use when validating certificates from a SSL server. Not applicable to Schannel-based SSL.

◆ getCaCertificate()

CertificatePtr RCF::ClientStub::getCaCertificate ( ) const

Gets the certificate authority certificate to use when validating certificates from a SSL server. Not applicable to Schannel-based SSL.

◆ setOpenSslCipherSuite()

void RCF::ClientStub::setOpenSslCipherSuite ( const std::string &  cipherSuite)

Sets the cipher suite to use when establishing an SSL connection. Only applicable to OpenSSL-based SSL.

◆ getOpenSslCipherSuite()

std::string RCF::ClientStub::getOpenSslCipherSuite ( ) const

Gets the cipher suite to use when establishing an SSL connection. Only applicable to OpenSSL-based SSL.

◆ setEnableSchannelCertificateValidation()

void RCF::ClientStub::setEnableSchannelCertificateValidation ( const tstring &  peerName)

Sets the certificate name to match against, when validating a server certificate. Only applicable to Schannel-based SSL.

◆ getEnableSchannelCertificateValidation()

tstring RCF::ClientStub::getEnableSchannelCertificateValidation ( ) const

Gets the certificate name to match against, when validating a server certificate. Only applicable to Schannel-based SSL.

◆ setCertificateValidationCallback()

void RCF::ClientStub::setCertificateValidationCallback ( CertificateValidationCallback  certificateValidationCb)

Sets the certificate validation callback.

◆ getCertificateValidationCallback()

const CertificateValidationCallback& RCF::ClientStub::getCertificateValidationCallback ( ) const

Gets the certificate validation callback.

◆ setSslImplementation()

void RCF::ClientStub::setSslImplementation ( SslImplementation  sslImplementation)

Sets the SSL implementation in use by this ClientStub (OpenSSL or Schannel).

◆ getSslImplementation()

SslImplementation RCF::ClientStub::getSslImplementation ( ) const

Gets the SSL implementation in use by this ClientStub (OpenSSL or Schannel).

◆ enableBatching()

void RCF::ClientStub::enableBatching ( )

Enables batch mode.

◆ disableBatching()

void RCF::ClientStub::disableBatching ( bool  flush = true)

Disables batch mode, optionally flushing the last batch.

◆ flushBatch()

void RCF::ClientStub::flushBatch ( unsigned int  timeoutMs = 0)

Flushes the current batch of messages.

◆ setMaxBatchMessageLength()

void RCF::ClientStub::setMaxBatchMessageLength ( std::uint32_t  maxBatchMessageLength)

Sets the maximum message length of a batch of messages.

◆ getMaxBatchMessageLength()

std::uint32_t RCF::ClientStub::getMaxBatchMessageLength ( )

Gets the maximum message length of a batch of messages.

◆ getBatchesSent()

std::uint32_t RCF::ClientStub::getBatchesSent ( )

Gets the number of batches sent since batch mode was enabled.

◆ getMessagesInCurrentBatch()

std::uint32_t RCF::ClientStub::getMessagesInCurrentBatch ( )

Gets the number of messages accumulated in the current batch.

◆ connectAsync()

void RCF::ClientStub::connectAsync ( std::function< void()>  onCompletion)

Establishes a network connection to the server asynchronously.

◆ ready()

bool RCF::ClientStub::ready ( )

Returns true if an asynchronous call is ready.

◆ waitForReady()

void RCF::ClientStub::waitForReady ( std::uint32_t  timeoutMs = 0)

Waits until an asynchronous call is ready.

◆ cancel()

void RCF::ClientStub::cancel ( )

Cancels an asynchronous call.

◆ hasAsyncException()

bool RCF::ClientStub::hasAsyncException ( )

Tests if an asynchronous call has resulted in an exception.

◆ getAsyncException()

std::unique_ptr<Exception> RCF::ClientStub::getAsyncException ( )

Retrieves an asynchronous exception.


The documentation for this class was generated from the following file: