Remote Call Framework 3.4
ClientStub.hpp
Go to the documentation of this file.
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2023, Delta V Software. All rights reserved.
6 // https://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF under GPL terms.
12 //
13 // Version: 3.4
14 // Contact: support <at> deltavsoft.com
15 //
16 //******************************************************************************
17 
19 
20 #ifndef INCLUDE_RCF_CLIENTSTUB_HPP
21 #define INCLUDE_RCF_CLIENTSTUB_HPP
22 
23 #include <string>
24 #include <vector>
25 #include <memory>
26 
27 #include <RCF/ClientProgress.hpp>
28 #include <RCF/ClientTransport.hpp>
29 #include <RCF/Enums.hpp>
30 #include <RCF/Export.hpp>
31 #include <RCF/RcfClient.hpp>
32 #include <RCF/MethodInvocation.hpp>
33 #include <RCF/SerializationProtocol_Base.hpp>
34 #include <RCF/RcfFwd.hpp>
35 #include <RCF/RecursionLimiter.hpp>
36 #include <RCF/SerializationProtocol.hpp>
37 #include <RCF/Tchar.hpp>
38 #include <RCF/ThreadLibrary.hpp>
39 
40 #if RCF_FEATURE_FILETRANSFER==1
41 #include <RCF/FileDownload.hpp>
42 #include <RCF/FileUpload.hpp>
43 #endif
44 
45 #ifdef RCF_WINDOWS
46 #include <windows.h>
47 #endif
48 
49 #ifdef RCF_WINDOWS
50 #include <wincred.h>
51 #endif
52 
53 namespace RCF {
54 
56 
59  class RCF_EXPORT HttpCookie
60  {
61  public:
62  HttpCookie();
63  HttpCookie(const std::string& name, const std::string& value);
64  std::string mName;
65  std::string mValue;
66  };
67 
68  class RCF_EXPORT CurrentClientStubSentry
69  {
70  public:
71  CurrentClientStubSentry(ClientStub & clientStub);
72  CurrentClientStubSentry(ClientStub * pClientStub);
73  ~CurrentClientStubSentry();
74 
75  private:
76  bool mEnabled;
77  };
78 
80 
82  class RCF_EXPORT ClientStub :
83  public ClientTransportCallback,
84  public std::enable_shared_from_this<ClientStub>
85  {
86 
87  public:
88  ClientStub(const std::string & interfaceName);
89  ClientStub(const std::string & interfaceName, const std::string &serverBindingName);
90  ClientStub(const ClientStub & rhs);
91  ~ClientStub();
92 
93  ClientStub &operator=(const ClientStub & rhs);
94 
95  private:
96  void init(const std::string & interfaceName, const std::string & serverBindingName);
97  void assign(const ClientStub & rhs);
98 
99  // Used internally only.
100  friend class I_RcfClient;
101  void setInterfaceName(const std::string & interfaceName);
102 
103 
104  public:
105 
109 
111 
113  void setServerEndpoint(const Endpoint &endpoint);
114 
116  void setServerEndpoint(EndpointPtr endpointPtr);
117 
119  EndpointPtr getServerEndpoint() const;
120 
122  void setTransport(ClientTransportUniquePtr transport);
123 
125  ClientTransport& getTransport();
126 
128  IpClientTransport & getIpTransport();
129 
131  ClientTransportUniquePtr releaseTransport();
132 
134  TransportType getTransportType();
135 
137  void connect();
138 
140  void disconnect();
141 
143  bool isConnected();
144 
146  FutureConverter<Void> ping();
147 
149 
154  void setAutoReconnect(bool autoReconnect);
155 
157  bool getAutoReconnect() const;
158 
160 
163  void setConnectTimeoutMs(unsigned int connectTimeoutMs);
164 
166  unsigned int getConnectTimeoutMs() const;
167 
169 
170  // Instantiates a client transport for this ClientStub, based on the endpoint type.
171  void instantiateTransport();
172 
173  // Sets the network endpoint at which the RCF server is located.
174  void setEndpoint(const Endpoint &endpoint);
175 
176  // Sets the network endpoint at which the RCF server is located.
177  void setEndpoint(EndpointPtr endpointPtr);
178 
179  // Gets the network endpoint at which the RCF server is located.
180  EndpointPtr getEndpoint() const;
181 
182 
186 
188 
190  void setTransportProtocol(TransportProtocol protocol);
191 
193  TransportProtocol getTransportProtocol() const;
194 
196 
198  void setUserName(const tstring & username);
199 
201  tstring getUserName() const;
202 
204 
206  void setPassword(const tstring & password);
207 
209  tstring getPassword() const;
210 
212 
213  // Only applicable to the Kerberos transport protocol.
214  void setKerberosSpn(const tstring & kerberosSpn);
215 
217  tstring getKerberosSpn() const;
218 
220 
222  void setEnableCompression(bool enableCompression);
223 
225  bool getEnableCompression() const;
226 
228  void setSspiMessageProtection(SspiMessageProtection sspiMessageProtection);
229 
231  SspiMessageProtection getSspiMessageProtection() const;
232 
234 
235 
238 
240 
242  const std::string & getInterfaceName();
243 
245  RemoteCallMode getRemoteCallMode() const;
246 
248  void setRemoteCallMode(RemoteCallMode defaultCallingSemantics);
249 
251  void setSerializationProtocol(SerializationProtocol protocol);
252 
254  SerializationProtocol getSerializationProtocol() const;
255 
257  void setEnableSfPointerTracking(bool enable);
258 
260  bool getEnableSfPointerTracking() const;
261 
263 
265  // and the archive version back to that of the RCF server, if the server reports a version mismatch.
267  void setAutoVersioning(bool autoVersioning);
268 
270  bool getAutoVersioning() const;
271 
273 
278  void setRuntimeVersion(std::uint32_t version);
279 
281  std::uint32_t getRuntimeVersion() const;
282 
284 
287  void setArchiveVersion(std::uint32_t version);
288 
290  std::uint32_t getArchiveVersion() const;
291 
293 
295  void setPingBackIntervalMs(int pingBackIntervalMs);
296 
298  int getPingBackIntervalMs();
299 
301 
303  void setRemoteCallTimeoutMs(unsigned int remoteCallTimeoutMs);
304 
306  unsigned int getRemoteCallTimeoutMs() const;
307 
310  void setRemoteCallProgressCallback(
311  RemoteCallProgressCallback progressCallback,
312  std::uint32_t callbackIntervalMs);
313 
314 
316 
317  // Gets the servant binding name to use on the RCF server.
318  const std::string & getServerBindingName() const;
319 
320  // Sets the servant binding name to use on the RCF server.
321  void setServerBindingName(const std::string &bindingName);
322 
323 
324 #if RCF_FEATURE_FILETRANSFER==1
325 
329 
331 
333  void downloadFile(
334  const std::string& downloadId,
335  const Path& downloadPath,
336  FileTransferOptions * pOptions = NULL);
337 
339  void uploadFile(
340  std::string& uploadId,
341  const Path& uploadPath,
342  FileTransferOptions * pOptions = NULL);
343 
345 
346 #endif
347 
348 
353 
355  void setRequestUserData(const std::string & userData);
356 
358  std::string getRequestUserData();
359 
361  void setResponseUserData(const std::string & userData);
362 
364  std::string getResponseUserData();
365 
367 
368  // Gets out-of-band data associated with the next request.
369  ByteBuffer getOutOfBandRequest();
370 
371  // Sets out-of-band data associated with the next request.
372  void setOutofBandRequest(ByteBuffer requestBuffer);
373 
374  // Gets out-of-band data associated with the previous response.
375  ByteBuffer getOutOfBandResponse();
376 
377  // Sets out-of-band data associated with the previous response.
378  void setOutofBandResponse(ByteBuffer responseBuffer);
379 
380 
383 
385 
387  void setHttpProxy(const std::string & httpProxy);
388 
390  std::string getHttpProxy() const;
391 
393  void setHttpProxyPort(int httpProxyPort);
394 
396  int getHttpProxyPort() const;
397 
399  void setHttpProxyUserName(const tstring & proxyUsername);
400 
402  tstring getHttpProxyUserName() const;
403 
405  void setHttpProxyPassword(const tstring & proxyPassword);
406 
408  tstring getHttpProxyPassword() const;
409 
411  void setHttpProxyRealm(const tstring & proxyRealm);
412 
414  tstring getHttpProxyRealm() const;
415 
417 
421  void setHttpCookies(const std::vector<HttpCookie> & cookies);
422 
424  std::vector<HttpCookie> getHttpCookies() const;
425 
427  void clearHttpCookies();
428 
430  void setHttpRedirectHandler(HttpRedirectHandler redirectHandler);
431 
433  HttpRedirectHandler getHttpRedirectHandler() const;
434 
436  void setHttpUrlParameterString(const std::string & urlParameterString);
437 
439  std::string getHttpUrlParameterString() const;
440 
441  HttpRedirectHandler mHttpRedirectHandler;
442 
444  void setHttpMessageVerifier(HttpMessageVerifierPtr verifierPtr);
445 
447  HttpMessageVerifierPtr getHttpMessageVerifier() const;
448 
449 #if RCF_FEATURE_HTTP==1
450 
451  void getHttpFrameInfo(
452  std::string& responseLine,
453  std::vector< std::pair<std::string, std::string> >& headers);
454 #endif
455 
457  void setHttpConnectionCloseHeader(bool connectionClose);
458 
460  bool getHttpConnectionCloseHeader() const;
461 
463 
468 
470  void setCertificate(CertificatePtr certificatePtr);
471 
473  CertificatePtr getCertificate() const;
474 
476  void setCaCertificate(CertificatePtr certificatePtr);
477 
479  CertificatePtr getCaCertificate() const;
480 
482  void setOpenSslCipherSuite(const std::string & cipherSuite);
483 
485  std::string getOpenSslCipherSuite() const;
486 
488  void setEnableSchannelCertificateValidation(const tstring & peerName);
489 
491  tstring getEnableSchannelCertificateValidation() const;
492 
494  void setCertificateValidationCallback(CertificateValidationCallback certificateValidationCb);
495 
497  const CertificateValidationCallback & getCertificateValidationCallback() const;
498 
499  // Sets the TLS SNI server name value. Only applicable to HTTPS connections.
500  void setTlsSniName(const tstring & serverName);
501 
502  // Gets the TLS SNI server name value. Only applicable to HTTPS connections.
503  tstring getTlsSniName() const;
504 
506  void setSslImplementation(SslImplementation sslImplementation);
507 
509  SslImplementation getSslImplementation() const;
510 
511 #if RCF_FEATURE_SSPI==1
512 
513  void setSchannelEnabledProtocols(DWORD enabledProtocols);
514  DWORD getSchannelEnabledProtocols() const;
515 
516  void setSchannelContextRequirements(ULONG contextRequirements);
517  ULONG getSchannelContextRequirements() const;
518 
521  PCtxtHandle getTransportSecurityContext() const;
522 
525  PCtxtHandle getTransportProtocolSecurityContext() const;
526 #endif
527 
529 
530 #ifdef RCF_WINDOWS
531  void setWindowsImpersonationToken(HANDLE hToken);
533 
535  HANDLE getWindowsImpersonationToken() const;
536 #endif
537 
538 
543 
545 
547  void enableBatching();
548 
550  void disableBatching(bool flush = true);
551 
553  void flushBatch(unsigned int timeoutMs = 0);
554 
556  void setMaxBatchMessageLength(std::uint32_t maxBatchMessageLength);
557 
559  std::uint32_t getMaxBatchMessageLength();
560 
562  std::uint32_t getBatchesSent();
563 
565  std::uint32_t getMessagesInCurrentBatch();
566 
568 
572 
574 
576  void connectAsync(std::function<void()> onCompletion);
577 
579  bool ready();
580 
582  void waitForReady(std::uint32_t timeoutMs = 0);
583 
585  void cancel();
586 
588  bool hasAsyncException();
589 
591  std::unique_ptr<Exception> getAsyncException();
592 
594 
595 
596  void wait(std::function<void()> onCompletion, std::uint32_t timeoutMs);
597 
598  void setTries(std::size_t tries);
599  std::size_t getTries() const;
600 
601 #if RCF_FEATURE_FILETRANSFER==1
602 
603  // Legacy file transfer API.
604 
605  void setFileProgressCallback(FileProgressCallback fileProgressCb);
606  void setFileProgressCallback() { setFileProgressCallback( FileProgressCallback() ); }
607  void runFileProgressNotifications(FileTransferProgress& progress);
608 
609  void uploadFiles(
610  const std::string & whichFile,
611  std::string & uploadId,
612  std::uint32_t chunkSize,
613  std::uint32_t transferRateBps,
614  std::uint32_t sessionLocalId);
615 
616  void uploadFiles(
617  const FileManifest & whichFile,
618  std::string & uploadId,
619  std::uint32_t chunkSize,
620  std::uint32_t transferRateBps,
621  std::uint32_t sessionLocalId);
622 
623  void downloadFiles(
624  const Path& downloadToPath,
625  FileManifest & manifest,
626  std::uint32_t chunkSize,
627  std::uint32_t transferRateBps,
628  std::uint32_t sessionLocalId,
629  const std::string & downloadId,
630  std::uint64_t startPos = 0,
631  std::uint64_t endPos = -1);
632 
633  std::uint32_t addUploadStream(FileUpload fileStream);
634  void processUploadStreams();
635 
636  std::uint32_t addDownloadStream(FileDownload fileStream);
637 
638  // For testing.
639  void setTransferWindowS(std::uint32_t transferWindowS);
640  std::uint32_t getTransferWindowS();
641 #endif
642 
643 
644  FutureConverter<Void> ping(const CallOptions & callOptions);
645 
646  FutureConverter<Void> doControlMessage(
647  const CallOptions & callOptions,
648  ByteBuffer controlRequest);
649 
650  //**********************************************************************
651 
652  public:
653 
654  std::size_t getPingBackCount();
655  std::uint32_t getPingBackTimeStamp();
656 
657  void clearParameters();
658 
659  SerializationProtocolIn & getSpIn();
660  SerializationProtocolOut & getSpOut();
661 
662  void setAsync(bool async);
663  bool getAsync();
664 
665  void setAsyncException(std::unique_ptr<Exception>);
666 
667  std::uint32_t generatePollingTimeout(std::uint32_t timeoutMs);
668  void onPollingTimeout(bool eventBased = false);
669  void onUiMessage();
670 
671  void setSubRcfClientPtr(RcfClientPtr clientStubPtr);
672  RcfClientPtr getSubRcfClientPtr();
673 
674  void setEnableNativeWstringSerialization(bool enable);
675  bool getEnableNativeWstringSerialization() const;
676 
677  friend class CallOptions;
678 
679  private:
680 
681  friend class FutureConverterBase;
682  friend class FutureImplBase;
683 
684  template<
685  typename R,
686  typename A1,
687  typename A2,
688  typename A3,
689  typename A4,
690  typename A5,
691  typename A6,
692  typename A7,
693  typename A8,
694  typename A9,
695  typename A10,
696  typename A11,
697  typename A12,
698  typename A13,
699  typename A14,
700  typename A15>
701  friend class AllocateClientParameters;
702 
703  template<
704  typename R,
705  typename A1,
706  typename A2,
707  typename A3,
708  typename A4,
709  typename A5,
710  typename A6,
711  typename A7,
712  typename A8,
713  typename A9,
714  typename A10,
715  typename A11,
716  typename A12,
717  typename A13,
718  typename A14,
719  typename A15>
720  friend class ClientParameters;
721 
722  template<typename T>
723  friend class Future;
724 
725  void enrol(
726  I_Future *pFuture);
727 
728  void init(
729  int fnId,
730  RCF::RemoteCallMode rcs);
731 
732  void beginCall();
733 
734  void beginSend();
735 
736  void beginReceive();
737 
738  void call(
739  RCF::RemoteCallMode rcs);
740 
741  void onConnectCompleted(
742  bool alreadyConnected = false);
743 
744  void setupTransportProtocol();
745  void onSetupTransportProtocolCompleted();
746 
747  void doBatching();
748 
749  void onSendCompleted();
750 
751  void onReceiveCompleted();
752 
753  void onTimerExpired();
754 
755  void onError(
756  const std::exception &e);
757 
758  void setAsyncCallback(
759  std::function<void()> callback);
760 
761  void onException(
762  const Exception & e);
763 
764  void scheduleAmiNotification();
765 
766  void createFilterSequence(std::vector<FilterPtr> & filters);
767 
768  void setConnected(bool connected);
769 
770  virtual bool isClientStub() const;
771 
772 
773 
774  public:
775  // Old-style setting of transport and message filters. Leaving as public for now.
776 
777  // Synchronous transport filter requests.
778  void requestTransportFilters(const std::vector<FilterPtr> &filters);
779  void requestTransportFilters(FilterPtr filterPtr);
780  void requestTransportFilters();
781 
782  void clearTransportFilters();
783 
784  // Asynchronous transport filter requests.
785  void requestTransportFiltersAsync(
786  const std::vector<FilterPtr> & filters,
787  std::function<void()> onCompletion);
788 
789  void requestTransportFiltersAsync(
790  FilterPtr filterPtr,
791  std::function<void()> onCompletion);
792 
793  void setMessageFilters(const std::vector<FilterPtr> &filters);
794  void setMessageFilters();
795  void setMessageFilters(FilterPtr filterPtr);
796 
797  const std::vector<FilterPtr> &getMessageFilters();
798 
799  std::vector<char> & getRetValVec();
800 
801 
802  void setupProxiedConnection(const std::string& proxyEndpointName);
803 
804  private:
805  std::string mProxyEndpointName;
806 
807  private:
808 
809  RemoteCallMode mRemoteCallMode;
810  SerializationProtocol mProtocol;
811  std::string mEndpointName;
812  std::string mServerBindingName;
813  std::string mInterfaceName;
814 
815  unsigned int mRemoteCallTimeoutMs;
816  unsigned int mConnectTimeoutMs;
817  bool mAutoReconnect;
818  bool mConnected;
819  std::size_t mTries;
820 
821  EndpointPtr mEndpoint;
822  ClientTransportUniquePtr mTransport;
823 
824  std::vector<FilterPtr> mMessageFilters;
825 
826  RemoteCallProgressCallback mProgressCallback;
827  unsigned int mProgressCallbackIntervalMs = 0;
828 
829 
830  bool mAutoVersioning;
831  std::uint32_t mRuntimeVersion;
832  std::uint32_t mArchiveVersion;
833 
834  bool mEnableSfPointerTracking;
835  bool mEnableNativeWstringSerialization = false;
836 
837  std::vector<I_Future *> mFutures;
838 
839  MethodInvocationRequest mRequest;
840  SerializationProtocolIn mIn;
841  SerializationProtocolOut mOut;
842 
843  bool mAsync;
844  AsyncOpType mAsyncOpType;
845  std::function<void()> mAsyncCallback;
846  std::unique_ptr<Exception> mAsyncException;
847  unsigned int mEndTimeMs;
848  bool mRetry;
849  RemoteCallMode mRcs;
850  ByteBuffer mEncodedByteBuffer;
851  std::vector<ByteBuffer> mEncodedByteBuffers;
852 
853  std::vector<char> mRetValVec;
854  std::vector<char> mParametersVec;
855  I_Parameters * mpParameters;
856 
857  std::uint32_t mPingBackIntervalMs;
858  std::uint32_t mPingBackTimeStamp;
859  std::size_t mPingBackCount;
860 
861  std::uint32_t mNextTimerCallbackMs;
862  std::uint32_t mNextPingBackCheckMs;
863  std::uint32_t mPingBackCheckIntervalMs;
864 
865  MutexPtr mSignalledMutexPtr;
866  ConditionPtr mSignalledConditionPtr;
867  LockPtr mSignalledLockPtr;
868 
869  bool mSignalled;
870 
871  Mutex mSubRcfClientMutex;
872  RcfClientPtr mSubRcfClientPtr;
873 
874  bool mBatchMode;
875  ReallocBufferPtr mBatchBufferPtr;
876  ReallocBuffer mBatchBufferTemp;
877  std::uint32_t mBatchMaxMessageLength;
878  std::uint32_t mBatchCount;
879  std::uint32_t mBatchMessageCount;
880 
881  // Set to true if we need to set the transport protocol without disconnecting.
882  bool mSetTransportProtocol;
883 
884 
885 #if RCF_FEATURE_FILETRANSFER==1
886  FileProgressCallback mFileProgressCb;
887 
888  std::vector<FileUpload> mUploadStreams;
889  std::vector<FileDownload> mDownloadStreams;
890 #endif
891 
892  std::uint32_t mTransferWindowS;
893 
894  RecursionState<int, int> mRecursionState;
895 
896  public:
897 
898  std::string mCurrentCallMethodName;
899  std::string mCurrentCallDesc;
900  bool mCallInProgress;
901 
902 #ifdef RCF_WINDOWS
903  private:
904  std::unique_ptr<HANDLE> mWindowsImpersonationToken;
905 #endif
906 
907  private:
908  std::string mHttpProxy;
909  int mHttpProxyPort;
910  tstring mHttpProxyRealm;
911  std::map<std::string, HttpCookie> mHttpCookies;
912  TransportProtocol mTransportProtocol;
913  tstring mUsername;
914  tstring mPassword;
915  tstring mHttpProxyUsername;
916  tstring mHttpProxyPassword;
917  std::string mHttpUrlParameterString;
918  HttpMessageVerifierPtr mHttpMessageVerifierPtr;
919  tstring mKerberosSpn;
920  bool mEnableCompression;
921  SspiMessageProtection mSspiMessageProtection = Smp_Encryption;
922 
923  CertificatePtr mCertificatePtr;
924  CertificatePtr mCaCertificatePtr;
925  CertificateValidationCallback mCertificateValidationCb;
926  tstring mSchannelCertificateValidation;
927 
928  std::string mOpenSslCipherSuite;
929 
930  tstring mTlsSniName;
931 
932  SslImplementation mSslImplementation;
933 
934 #if RCF_FEATURE_SSPI==1
935  DWORD mSchannelEnabledProtocols = 0;
936  ULONG mSchannelContextRequirements = 0;
937 #endif
938 
939  bool mHttpConnectionClose = false;
940 
941  friend class HttpFrameFilter;
942  std::map<std::string, HttpCookie> & getCookieMap();
943 
944  private:
945  void requestTransportFilters_Legacy(const std::vector<FilterPtr> &filters);
946 
947  void requestTransportFiltersAsync_Legacy(
948  const std::vector<FilterPtr> &filters,
949  std::function<void()> onCompletion);
950  };
951 
952  class RCF_EXPORT CallOptions
953  {
954  public:
955  CallOptions();
956  CallOptions(RemoteCallMode rcs);
957  CallOptions(RemoteCallMode rcs, const std::function<void()> & callback);
958  CallOptions(std::function<void()> callback);
959  RemoteCallMode apply(ClientStub &clientStub) const;
960 
961  private:
962  bool mAsync;
963  bool mRcsSpecified;
964  RemoteCallMode mRcs;
965  std::function<void()> mCallback;
966  };
967 
968  class RCF_EXPORT AsyncTwoway : public CallOptions
969  {
970  public:
971  AsyncTwoway(const std::function<void()> & callback);
972  };
973 
974  class RCF_EXPORT AsyncOneway : public CallOptions
975  {
976  public:
977  AsyncOneway(const std::function<void()> & callback);
978  };
979 
980  class RestoreClientTransportGuard
981  {
982  public:
983 
984  RestoreClientTransportGuard(ClientStub &client, ClientStub &clientTemp);
985  ~RestoreClientTransportGuard();
986 
987  private:
988  ClientStub &mClient;
989  ClientStub &mClientTemp;
990  };
991 
992 } // namespace RCF
993 
994 #endif // ! INCLUDE_RCF_CLIENTSTUB_HPP
SspiMessageProtection
Definition: Enums.hpp:206
RCF_FILESYSTEM_NS::path Path
Typedef for standard C++ path type.
Definition: FileSystem.hpp:31
RCF_EXPORT std::uint32_t getArchiveVersion()
Gets the RCF archive version number.
Base class of all RcfClient<> templates.
Definition: RcfClient.hpp:44
std::function< void(const RemoteCallProgressInfo &, RemoteCallAction &)> RemoteCallProgressCallback
Describes a user-provided callback function to be called periodically on the client side...
Definition: RcfFwd.hpp:83
Client side options for downloading and uploading files.
Definition: FileStream.hpp:370
Controls the client side of a RCF connection.
Definition: ClientStub.hpp:82
std::shared_ptr< Endpoint > EndpointPtr
Reference counted wrapper for RCF::Endpoint.
Definition: RcfFwd.hpp:117
std::shared_ptr< Certificate > CertificatePtr
Reference counted wrapper for RCF::Certificate.
Definition: RcfFwd.hpp:108
SerializationProtocol
Describes which serialization implementation to use when serializing data structures for a remote cal...
Definition: Enums.hpp:166
std::unique_ptr< ClientTransport > ClientTransportUniquePtr
Unique pointer wrapper for RCF::ClientTransport.
Definition: RcfFwd.hpp:43
Base class for all client transports.
Definition: ClientTransport.hpp:74
std::function< bool(Certificate *)> CertificateValidationCallback
Describes user-provided callback functions for validating a certificate.
Definition: RcfFwd.hpp:114
RemoteCallMode
Remote call mode.
Definition: Enums.hpp:140
Provides the ability for remote calls to be executed asynchronously.
Definition: Future.hpp:50
Base class for all RCF exceptions.
Definition: Exception.hpp:67
std::function< void(const FileTransferProgress &, RemoteCallAction &)> FileProgressCallback
Describes user-provided callback functions for client-side monitoring of a file transfer (download or...
Definition: RcfFwd.hpp:131
RCF_EXPORT void setArchiveVersion(std::uint32_t version)
Sets the RCF archive version number. Applies to all RCF clients and servers within the current proces...
std::shared_ptr< HttpMessageVerifier > HttpMessageVerifierPtr
Reference counted wrapper for RCF::HttpMessageVerifier.
Definition: HttpFrameFilter.hpp:60
RCF_EXPORT std::uint32_t getRuntimeVersion()
Gets the RCF runtime version number.
SslImplementation
Describes which SSL implementation to use.
Definition: Enums.hpp:84
Utility class used by RCF to determine whether a remote call should be performed synchronously or asy...
Definition: Future.hpp:34
Base class for all network endpoint types.
Definition: Endpoint.hpp:40
Base class for IP-based client transports. Provides IP-related functionality.
Definition: IpClientTransport.hpp:27
Definition: ByteBuffer.hpp:39
TransportProtocol
Describes the transport protocols used by a RCF connection. Transport protocols are layered on top of...
Definition: Enums.hpp:62
Definition: AmiIoHandler.hpp:23
TransportType
Describes the transport types used by a RCF connection.
Definition: Enums.hpp:33
RCF_EXPORT void setRuntimeVersion(std::uint32_t version)
Sets the RCF runtime version number. Applies to all RCF clients and servers within the current proces...
std::function< void(const std::string &statusLine, const HttpHeaderList &headerList)> HttpRedirectHandler
Describes a user-provided function for handling HTTP redirect responses when connecting to a HTTP/HTT...
Definition: RcfFwd.hpp:333
RCF_EXPORT bool init(RcfConfigT *=nullptr)
Reference-counted initialization of RCF library. May be called multiple times (see deinit())...
Describes progress of a file download or upload.
Definition: FileStream.hpp:265