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... | |
ClientTransport & | getTransport () |
Returns a reference to the client transport of this ClientStub. More... | |
IpClientTransport & | getIpTransport () |
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 CertificateValidationCallback & | getCertificateValidationCallback () 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< Exception > | getAsyncException () |
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< HttpCookie > | getHttpCookies () 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... | |
Controls the client side of a RCF connection.
ClientStub is normally accessed through the RcfClient<>::getClientStub() function.
void RCF::ClientStub::setServerEndpoint | ( | const Endpoint & | endpoint | ) |
Sets the network endpoint at which the RCF server is located.
void RCF::ClientStub::setServerEndpoint | ( | EndpointPtr | endpointPtr | ) |
Sets the network endpoint at which the RCF server is located.
EndpointPtr RCF::ClientStub::getServerEndpoint | ( | ) | const |
Gets the network endpoint at which the RCF server is located.
void RCF::ClientStub::setTransport | ( | ClientTransportUniquePtr | transport | ) |
Replaces the client transport for this ClientStub.
ClientTransport& RCF::ClientStub::getTransport | ( | ) |
Returns a reference to the client transport of this ClientStub.
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.
ClientTransportUniquePtr RCF::ClientStub::releaseTransport | ( | ) |
Releases the client transport from this ClientStub.
TransportType RCF::ClientStub::getTransportType | ( | ) |
Gets the client transport type.
void RCF::ClientStub::connect | ( | ) |
Establishes a network connection to the server.
void RCF::ClientStub::disconnect | ( | ) |
Disconnects from the server.
bool RCF::ClientStub::isConnected | ( | ) |
Gets a boolean value indicating if the ClientStub has been connected.
FutureConverter<Void> RCF::ClientStub::ping | ( | ) |
Makes a two-way ping call to the RCF server.
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.
bool RCF::ClientStub::getAutoReconnect | ( | ) | const |
Gets whether automatic network re-connection is enabled.
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().
unsigned int RCF::ClientStub::getConnectTimeoutMs | ( | ) | const |
Gets the connect timeout.
void RCF::ClientStub::setTransportProtocol | ( | TransportProtocol | protocol | ) |
Sets the transport protocol.
TransportProtocol RCF::ClientStub::getTransportProtocol | ( | ) | const |
Gets the transport protocol.
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.
tstring RCF::ClientStub::getUserName | ( | ) | const |
Gets the user name to use when authenticating to the server.
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.
tstring RCF::ClientStub::getPassword | ( | ) | const |
Gets the password to use when authenticating to the server.
void RCF::ClientStub::setKerberosSpn | ( | const tstring & | kerberosSpn | ) |
Sets the Kerberos SPN to use when authenticating to the server.
tstring RCF::ClientStub::getKerberosSpn | ( | ) | const |
Gets the Kerberos SPN to use when authenticating to the server.
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.
bool RCF::ClientStub::getEnableCompression | ( | ) | const |
Gets whether compression is enabled for this connection.
void RCF::ClientStub::setSspiMessageProtection | ( | SspiMessageProtection | sspiMessageProtection | ) |
Sets the protection level for messages sent using the Kerberos, NTLM and Negotiate transport protocols.
SspiMessageProtection RCF::ClientStub::getSspiMessageProtection | ( | ) | const |
Gets the protection level for messages sent using the Kerberos, NTLM and Negotiate transport protocols.
const std::string& RCF::ClientStub::getInterfaceName | ( | ) |
Gets the RCF interface name of the RCF client.
RemoteCallMode RCF::ClientStub::getRemoteCallMode | ( | ) | const |
Gets the remote call mode.
void RCF::ClientStub::setRemoteCallMode | ( | RemoteCallMode | defaultCallingSemantics | ) |
Sets the remote call mode.
void RCF::ClientStub::setSerializationProtocol | ( | SerializationProtocol | protocol | ) |
Sets the remote call serialization protocol.
SerializationProtocol RCF::ClientStub::getSerializationProtocol | ( | ) | const |
Gets the remote call serialization protocol.
void RCF::ClientStub::setEnableSfPointerTracking | ( | bool | enable | ) |
Sets pointer tracking mode when using SF serialization.
bool RCF::ClientStub::getEnableSfPointerTracking | ( | ) | const |
Gets pointer tracking mode when using SF serialization.
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.
bool RCF::ClientStub::getAutoVersioning | ( | ) | const |
Gets the auto-versioning property.
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.
std::uint32_t RCF::ClientStub::getRuntimeVersion | ( | ) | const |
Gets the RCF runtime version of this ClientStub.
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.
std::uint32_t RCF::ClientStub::getArchiveVersion | ( | ) | const |
Gets the archive version in use by this ClientStub.
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.
int RCF::ClientStub::getPingBackIntervalMs | ( | ) |
Gets the ping-back interval.
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.
unsigned int RCF::ClientStub::getRemoteCallTimeoutMs | ( | ) | const |
Gets the remote call timeout.
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.
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.
void RCF::ClientStub::uploadFile | ( | std::string & | uploadId, |
const Path & | uploadPath, | ||
FileTransferOptions * | pOptions = NULL |
||
) |
void RCF::ClientStub::setRequestUserData | ( | const std::string & | userData | ) |
Sets application-specific data associated with the RCF request.
std::string RCF::ClientStub::getRequestUserData | ( | ) |
Gets application-specific data associated with the RCF request.
void RCF::ClientStub::setResponseUserData | ( | const std::string & | userData | ) |
Sets application-specific data associated with the RCF response.
std::string RCF::ClientStub::getResponseUserData | ( | ) |
Gets application-specific data associated with the RCF response.
void RCF::ClientStub::setHttpProxy | ( | const std::string & | httpProxy | ) |
Sets the HTTP proxy to use for HTTP/HTTPS connections.
std::string RCF::ClientStub::getHttpProxy | ( | ) | const |
Gets the HTTP proxy to use for HTTP/HTTPS connections.
void RCF::ClientStub::setHttpProxyPort | ( | int | httpProxyPort | ) |
Sets the HTTP proxy port to use for HTTP/HTTPS connections.
int RCF::ClientStub::getHttpProxyPort | ( | ) | const |
Gets the HTTP proxy port to use for HTTP/HTTPS connections.
void RCF::ClientStub::setHttpProxyUserName | ( | const tstring & | proxyUsername | ) |
Sets the user name to use when authenticating to an HTTP proxy.
tstring RCF::ClientStub::getHttpProxyUserName | ( | ) | const |
Gets the user name to use when authenticating to an HTTP proxy.
void RCF::ClientStub::setHttpProxyPassword | ( | const tstring & | proxyPassword | ) |
Sets the password to use when authenticating to an HTTP proxy.
tstring RCF::ClientStub::getHttpProxyPassword | ( | ) | const |
Gets the password to use when authenticating to an HTTP proxy.
void RCF::ClientStub::setHttpProxyRealm | ( | const tstring & | proxyRealm | ) |
Sets the realm value to use when authenticating to an HTTP proxy.
tstring RCF::ClientStub::getHttpProxyRealm | ( | ) | const |
Gets the realm value to use when authenticating to an HTTP proxy.
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.
std::vector<HttpCookie> RCF::ClientStub::getHttpCookies | ( | ) | const |
Gets a list of cookies that have been returned as part of HTTP responses.
void RCF::ClientStub::clearHttpCookies | ( | ) |
Clears the list of cookies to include in HTTP requests to the server.
void RCF::ClientStub::setHttpRedirectHandler | ( | HttpRedirectHandler | redirectHandler | ) |
Sets the redirect handler, to be called when the client receives a HTTP redirect response.
HttpRedirectHandler RCF::ClientStub::getHttpRedirectHandler | ( | ) | const |
Gets the redirect handler.
void RCF::ClientStub::setHttpUrlParameterString | ( | const std::string & | urlParameterString | ) |
Sets the URL parameter string to append to the server URL when making a HTTP request.
std::string RCF::ClientStub::getHttpUrlParameterString | ( | ) | const |
Gets the URL parameter string to append to the server URL when making a HTTP request.
void RCF::ClientStub::setHttpMessageVerifier | ( | HttpMessageVerifierPtr | verifierPtr | ) |
Sets the HTTP message verification mechanism to use for HTTP connections.
HttpMessageVerifierPtr RCF::ClientStub::getHttpMessageVerifier | ( | ) | const |
Gets the HTTP message verification mechanism to use for HTTP connections.
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'.
bool RCF::ClientStub::getHttpConnectionCloseHeader | ( | ) | const |
Gets a value indicating if the next message to the server should set the HTTP 'Connection' header to 'Close'.
void RCF::ClientStub::setCertificate | ( | CertificatePtr | certificatePtr | ) |
Sets the certificate to use when authenticating to a SSL server.
CertificatePtr RCF::ClientStub::getCertificate | ( | ) | const |
Gets the certificate to use when authenticating to a SSL server.
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.
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.
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.
std::string RCF::ClientStub::getOpenSslCipherSuite | ( | ) | const |
Gets the cipher suite to use when establishing an SSL connection. Only applicable to OpenSSL-based SSL.
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.
tstring RCF::ClientStub::getEnableSchannelCertificateValidation | ( | ) | const |
Gets the certificate name to match against, when validating a server certificate. Only applicable to Schannel-based SSL.
void RCF::ClientStub::setCertificateValidationCallback | ( | CertificateValidationCallback | certificateValidationCb | ) |
Sets the certificate validation callback.
const CertificateValidationCallback& RCF::ClientStub::getCertificateValidationCallback | ( | ) | const |
Gets the certificate validation callback.
void RCF::ClientStub::setSslImplementation | ( | SslImplementation | sslImplementation | ) |
Sets the SSL implementation in use by this ClientStub (OpenSSL or Schannel).
SslImplementation RCF::ClientStub::getSslImplementation | ( | ) | const |
Gets the SSL implementation in use by this ClientStub (OpenSSL or Schannel).
void RCF::ClientStub::enableBatching | ( | ) |
Enables batch mode.
void RCF::ClientStub::disableBatching | ( | bool | flush = true | ) |
Disables batch mode, optionally flushing the last batch.
void RCF::ClientStub::flushBatch | ( | unsigned int | timeoutMs = 0 | ) |
Flushes the current batch of messages.
void RCF::ClientStub::setMaxBatchMessageLength | ( | std::uint32_t | maxBatchMessageLength | ) |
Sets the maximum message length of a batch of messages.
std::uint32_t RCF::ClientStub::getMaxBatchMessageLength | ( | ) |
Gets the maximum message length of a batch of messages.
std::uint32_t RCF::ClientStub::getBatchesSent | ( | ) |
Gets the number of batches sent since batch mode was enabled.
std::uint32_t RCF::ClientStub::getMessagesInCurrentBatch | ( | ) |
Gets the number of messages accumulated in the current batch.
void RCF::ClientStub::connectAsync | ( | std::function< void()> | onCompletion | ) |
Establishes a network connection to the server asynchronously.
bool RCF::ClientStub::ready | ( | ) |
Returns true if an asynchronous call is ready.
void RCF::ClientStub::waitForReady | ( | std::uint32_t | timeoutMs = 0 | ) |
Waits until an asynchronous call is ready.
void RCF::ClientStub::cancel | ( | ) |
Cancels an asynchronous call.
bool RCF::ClientStub::hasAsyncException | ( | ) |
Tests if an asynchronous call has resulted in an exception.
std::unique_ptr<Exception> RCF::ClientStub::getAsyncException | ( | ) |
Retrieves an asynchronous exception.