Remote Call Framework 3.2
ClientStub.hpp
Go to the documentation of this file.
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2020, Delta V Software. All rights reserved.
6 // http://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
12 // under GPL terms.
13 //
14 // Version: 3.2
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
20 
21 #ifndef INCLUDE_RCF_CLIENTSTUB_HPP
22 #define INCLUDE_RCF_CLIENTSTUB_HPP
23 
24 #include <string>
25 #include <vector>
26 #include <memory>
27 
28 #include <RCF/ClientProgress.hpp>
29 #include <RCF/ClientTransport.hpp>
30 #include <RCF/Enums.hpp>
31 #include <RCF/Export.hpp>
32 #include <RCF/RcfClient.hpp>
33 #include <RCF/MethodInvocation.hpp>
34 #include <RCF/SerializationProtocol_Base.hpp>
35 #include <RCF/RcfFwd.hpp>
36 #include <RCF/RecursionLimiter.hpp>
37 #include <RCF/SerializationProtocol.hpp>
38 #include <RCF/Tchar.hpp>
39 #include <RCF/ThreadLibrary.hpp>
40 
41 #if RCF_FEATURE_FILETRANSFER==1
42 #include <RCF/FileDownload.hpp>
43 #include <RCF/FileUpload.hpp>
44 #endif
45 
46 #ifdef RCF_WINDOWS
47 #include <windows.h>
48 #endif
49 
50 #ifdef RCF_WINDOWS
51 #include <wincred.h>
52 #endif
53 
54 namespace RCF {
55 
57 
60  class RCF_EXPORT HttpCookie
61  {
62  public:
63  HttpCookie();
64  HttpCookie(const std::string& name, const std::string& value);
65  std::string mName;
66  std::string mValue;
67  };
68 
69  class RCF_EXPORT CurrentClientStubSentry
70  {
71  public:
72  CurrentClientStubSentry(ClientStub & clientStub);
73  CurrentClientStubSentry(ClientStub * pClientStub);
74  ~CurrentClientStubSentry();
75 
76  private:
77  bool mEnabled;
78  };
79 
81 
83  class RCF_EXPORT ClientStub :
84  public ClientTransportCallback,
85  public std::enable_shared_from_this<ClientStub>
86  {
87 
88  public:
89  ClientStub(const std::string & interfaceName);
90  ClientStub(const std::string & interfaceName, const std::string &serverBindingName);
91  ClientStub(const ClientStub & rhs);
92  ~ClientStub();
93 
94  ClientStub &operator=(const ClientStub & rhs);
95 
96  private:
97  void init(const std::string & interfaceName, const std::string & serverBindingName);
98  void assign(const ClientStub & rhs);
99 
100  // Used internally only.
101  friend class I_RcfClient;
102  void setInterfaceName(const std::string & interfaceName);
103 
104 
105  public:
106 
110 
112 
114  void setServerEndpoint(const Endpoint &endpoint);
115 
117  void setServerEndpoint(EndpointPtr endpointPtr);
118 
120  EndpointPtr getServerEndpoint() const;
121 
123  void setTransport(ClientTransportUniquePtr transport);
124 
126  ClientTransport& getTransport();
127 
129  IpClientTransport & getIpTransport();
130 
132  ClientTransportUniquePtr releaseTransport();
133 
135  TransportType getTransportType();
136 
138  void connect();
139 
141  void disconnect();
142 
144  bool isConnected();
145 
147  FutureConverter<Void> ping();
148 
150 
155  void setAutoReconnect(bool autoReconnect);
156 
158  bool getAutoReconnect() const;
159 
161 
164  void setConnectTimeoutMs(unsigned int connectTimeoutMs);
165 
167  unsigned int getConnectTimeoutMs() const;
168 
170 
171  // Instantiates a client transport for this ClientStub, based on the endpoint type.
172  void instantiateTransport();
173 
174  // Sets the network endpoint at which the RCF server is located.
175  void setEndpoint(const Endpoint &endpoint);
176 
177  // Sets the network endpoint at which the RCF server is located.
178  void setEndpoint(EndpointPtr endpointPtr);
179 
180  // Gets the network endpoint at which the RCF server is located.
181  EndpointPtr getEndpoint() const;
182 
183 
187 
189 
191  void setTransportProtocol(TransportProtocol protocol);
192 
194  TransportProtocol getTransportProtocol() const;
195 
197 
199  void setUserName(const tstring & username);
200 
202  tstring getUserName() const;
203 
205 
207  void setPassword(const tstring & password);
208 
210  tstring getPassword() const;
211 
213 
214  // Only applicable to the Kerberos transport protocol.
215  void setKerberosSpn(const tstring & kerberosSpn);
216 
218  tstring getKerberosSpn() const;
219 
221 
223  void setEnableCompression(bool enableCompression);
224 
226  bool getEnableCompression() const;
227 
229  void setSspiMessageProtection(SspiMessageProtection sspiMessageProtection);
230 
232  SspiMessageProtection getSspiMessageProtection() const;
233 
235 
236 
239 
241 
243  const std::string & getInterfaceName();
244 
246  RemoteCallMode getRemoteCallMode() const;
247 
249  void setRemoteCallMode(RemoteCallMode defaultCallingSemantics);
250 
252  void setSerializationProtocol(SerializationProtocol protocol);
253 
255  SerializationProtocol getSerializationProtocol() const;
256 
258  void setEnableSfPointerTracking(bool enable);
259 
261  bool getEnableSfPointerTracking() const;
262 
264 
266  // and the archive version back to that of the RCF server, if the server reports a version mismatch.
268  void setAutoVersioning(bool autoVersioning);
269 
271  bool getAutoVersioning() const;
272 
274 
279  void setRuntimeVersion(std::uint32_t version);
280 
282  std::uint32_t getRuntimeVersion() const;
283 
285 
288  void setArchiveVersion(std::uint32_t version);
289 
291  std::uint32_t getArchiveVersion() const;
292 
294 
296  void setPingBackIntervalMs(int pingBackIntervalMs);
297 
299  int getPingBackIntervalMs();
300 
302 
304  void setRemoteCallTimeoutMs(unsigned int remoteCallTimeoutMs);
305 
307  unsigned int getRemoteCallTimeoutMs() const;
308 
311  void setRemoteCallProgressCallback(
312  RemoteCallProgressCallback progressCallback,
313  std::uint32_t callbackIntervalMs);
314 
315 
317 
318  // Gets the servant binding name to use on the RCF server.
319  const std::string & getServerBindingName() const;
320 
321  // Sets the servant binding name to use on the RCF server.
322  void setServerBindingName(const std::string &bindingName);
323 
324 
325 #if RCF_FEATURE_FILETRANSFER==1
326 
330 
332 
334  void downloadFile(
335  const std::string& downloadId,
336  const Path& downloadPath,
337  FileTransferOptions * pOptions = NULL);
338 
340  void uploadFile(
341  std::string& uploadId,
342  const Path& uploadPath,
343  FileTransferOptions * pOptions = NULL);
344 
346 
347 #endif
348 
349 
354 
356  void setRequestUserData(const std::string & userData);
357 
359  std::string getRequestUserData();
360 
362  void setResponseUserData(const std::string & userData);
363 
365  std::string getResponseUserData();
366 
368 
369  // Gets out-of-band data associated with the next request.
370  ByteBuffer getOutOfBandRequest();
371 
372  // Sets out-of-band data associated with the next request.
373  void setOutofBandRequest(ByteBuffer requestBuffer);
374 
375  // Gets out-of-band data associated with the previous response.
376  ByteBuffer getOutOfBandResponse();
377 
378  // Sets out-of-band data associated with the previous response.
379  void setOutofBandResponse(ByteBuffer responseBuffer);
380 
381 
384 
386 
388  void setHttpProxy(const std::string & httpProxy);
389 
391  std::string getHttpProxy() const;
392 
394  void setHttpProxyPort(int httpProxyPort);
395 
397  int getHttpProxyPort() const;
398 
400  void setHttpProxyUserName(const tstring & proxyUsername);
401 
403  tstring getHttpProxyUserName() const;
404 
406  void setHttpProxyPassword(const tstring & proxyPassword);
407 
409  tstring getHttpProxyPassword() const;
410 
412  void setHttpProxyRealm(const tstring & proxyRealm);
413 
415  tstring getHttpProxyRealm() const;
416 
418 
422  void setHttpCookies(const std::vector<HttpCookie> & cookies);
423 
425  std::vector<HttpCookie> getHttpCookies() const;
426 
428  void clearHttpCookies();
429 
431  void setHttpRedirectHandler(HttpRedirectHandler redirectHandler);
432 
434  HttpRedirectHandler getHttpRedirectHandler() const;
435 
437  void setHttpUrlParameterString(const std::string & urlParameterString);
438 
440  std::string getHttpUrlParameterString() const;
441 
442  HttpRedirectHandler mHttpRedirectHandler;
443 
445  void setHttpMessageVerifier(HttpMessageVerifierPtr verifierPtr);
446 
448  HttpMessageVerifierPtr getHttpMessageVerifier() const;
449 
450  HttpMessageVerifierPtr mHttpMessageVerifierPtr;
451 
453 
458 
460  void setCertificate(CertificatePtr certificatePtr);
461 
463  CertificatePtr getCertificate() const;
464 
466  void setCaCertificate(CertificatePtr certificatePtr);
467 
469  CertificatePtr getCaCertificate() const;
470 
472  void setOpenSslCipherSuite(const std::string & cipherSuite);
473 
475  std::string getOpenSslCipherSuite() const;
476 
478  void setEnableSchannelCertificateValidation(const tstring & peerName);
479 
481  tstring getEnableSchannelCertificateValidation() const;
482 
484  void setCertificateValidationCallback(CertificateValidationCallback certificateValidationCb);
485 
487  const CertificateValidationCallback & getCertificateValidationCallback() const;
488 
489  // Sets the TLS SNI server name value. Only applicable to HTTPS connections.
490  void setTlsSniName(const tstring & serverName);
491 
492  // Gets the TLS SNI server name value. Only applicable to HTTPS connections.
493  tstring getTlsSniName() const;
494 
496  void setSslImplementation(SslImplementation sslImplementation);
497 
499  SslImplementation getSslImplementation() const;
500 
501 #if RCF_FEATURE_SSPI==1
502 
503  void setSchannelEnabledProtocols(DWORD enabledProtocols);
504  DWORD getSchannelEnabledProtocols() const;
505 
506  void setSchannelContextRequirements(ULONG contextRequirements);
507  ULONG getSchannelContextRequirements() const;
508 
511  PCtxtHandle getTransportSecurityContext() const;
512 
515  PCtxtHandle getTransportProtocolSecurityContext() const;
516 #endif
517 
519 
520 #ifdef RCF_WINDOWS
521  void setWindowsImpersonationToken(HANDLE hToken);
523 
525  HANDLE getWindowsImpersonationToken() const;
526 #endif
527 
528 
533 
535 
537  void enableBatching();
538 
540  void disableBatching(bool flush = true);
541 
543  void flushBatch(unsigned int timeoutMs = 0);
544 
546  void setMaxBatchMessageLength(std::uint32_t maxBatchMessageLength);
547 
549  std::uint32_t getMaxBatchMessageLength();
550 
552  std::uint32_t getBatchesSent();
553 
555  std::uint32_t getMessagesInCurrentBatch();
556 
558 
562 
564 
566  void connectAsync(std::function<void()> onCompletion);
567 
569  bool ready();
570 
572  void waitForReady(std::uint32_t timeoutMs = 0);
573 
575  void cancel();
576 
578  bool hasAsyncException();
579 
581  std::unique_ptr<Exception> getAsyncException();
582 
584 
585 
586  void wait(std::function<void()> onCompletion, std::uint32_t timeoutMs);
587 
588  void setTries(std::size_t tries);
589  std::size_t getTries() const;
590 
591 #if RCF_FEATURE_FILETRANSFER==1
592 
593  // Legacy file transfer API.
594 
595  void setFileProgressCallback(FileProgressCallback fileProgressCb);
596  void setFileProgressCallback() { setFileProgressCallback( FileProgressCallback() ); }
597  void runFileProgressNotifications(FileTransferProgress& progress);
598 
599  void uploadFiles(
600  const std::string & whichFile,
601  std::string & uploadId,
602  std::uint32_t chunkSize,
603  std::uint32_t transferRateBps,
604  std::uint32_t sessionLocalId);
605 
606  void uploadFiles(
607  const FileManifest & whichFile,
608  std::string & uploadId,
609  std::uint32_t chunkSize,
610  std::uint32_t transferRateBps,
611  std::uint32_t sessionLocalId);
612 
613  void downloadFiles(
614  const Path& downloadToPath,
615  FileManifest & manifest,
616  std::uint32_t chunkSize,
617  std::uint32_t transferRateBps,
618  std::uint32_t sessionLocalId,
619  const std::string & downloadId,
620  std::uint64_t startPos = 0,
621  std::uint64_t endPos = -1);
622 
623  std::uint32_t addUploadStream(FileUpload fileStream);
624  void processUploadStreams();
625 
626  std::uint32_t addDownloadStream(FileDownload fileStream);
627 
628  // For testing.
629  void setTransferWindowS(std::uint32_t transferWindowS);
630  std::uint32_t getTransferWindowS();
631 #endif
632 
633 
634  FutureConverter<Void> ping(const CallOptions & callOptions);
635 
636  FutureConverter<Void> doControlMessage(
637  const CallOptions & callOptions,
638  ByteBuffer controlRequest);
639 
640  //**********************************************************************
641 
642  public:
643 
644  std::size_t getPingBackCount();
645  std::uint32_t getPingBackTimeStamp();
646 
647  void clearParameters();
648 
649  SerializationProtocolIn & getSpIn();
650  SerializationProtocolOut & getSpOut();
651 
652  void setAsync(bool async);
653  bool getAsync();
654 
655  void setAsyncException(std::unique_ptr<Exception>);
656 
657  std::uint32_t generatePollingTimeout(std::uint32_t timeoutMs);
658  void onPollingTimeout(bool eventBased = false);
659  void onUiMessage();
660 
661  void setSubRcfClientPtr(RcfClientPtr clientStubPtr);
662  RcfClientPtr getSubRcfClientPtr();
663 
664  void setEnableNativeWstringSerialization(bool enable);
665  bool getEnableNativeWstringSerialization() const;
666 
667  friend class CallOptions;
668 
669  private:
670 
671  friend class FutureConverterBase;
672  friend class FutureImplBase;
673 
674  template<
675  typename R,
676  typename A1,
677  typename A2,
678  typename A3,
679  typename A4,
680  typename A5,
681  typename A6,
682  typename A7,
683  typename A8,
684  typename A9,
685  typename A10,
686  typename A11,
687  typename A12,
688  typename A13,
689  typename A14,
690  typename A15>
691  friend class AllocateClientParameters;
692 
693  template<
694  typename R,
695  typename A1,
696  typename A2,
697  typename A3,
698  typename A4,
699  typename A5,
700  typename A6,
701  typename A7,
702  typename A8,
703  typename A9,
704  typename A10,
705  typename A11,
706  typename A12,
707  typename A13,
708  typename A14,
709  typename A15>
710  friend class ClientParameters;
711 
712  template<typename T>
713  friend class Future;
714 
715  void enrol(
716  I_Future *pFuture);
717 
718  void init(
719  int fnId,
720  RCF::RemoteCallMode rcs);
721 
722  void beginCall();
723 
724  void beginSend();
725 
726  void beginReceive();
727 
728  void call(
729  RCF::RemoteCallMode rcs);
730 
731  void onConnectCompleted(
732  bool alreadyConnected = false);
733 
734  void setupTransportProtocol();
735  void onSetupTransportProtocolCompleted();
736 
737  void doBatching();
738 
739  void onSendCompleted();
740 
741  void onReceiveCompleted();
742 
743  void onTimerExpired();
744 
745  void onError(
746  const std::exception &e);
747 
748  void setAsyncCallback(
749  std::function<void()> callback);
750 
751  void onException(
752  const Exception & e);
753 
754  void scheduleAmiNotification();
755 
756  void createFilterSequence(std::vector<FilterPtr> & filters);
757 
758  void setConnected(bool connected);
759 
760  virtual bool isClientStub() const;
761 
762 
763 
764  public:
765  // Old-style setting of transport and message filters. Leaving as public for now.
766 
767  // Synchronous transport filter requests.
768  void requestTransportFilters(const std::vector<FilterPtr> &filters);
769  void requestTransportFilters(FilterPtr filterPtr);
770  void requestTransportFilters();
771 
772  void clearTransportFilters();
773 
774  // Asynchronous transport filter requests.
775  void requestTransportFiltersAsync(
776  const std::vector<FilterPtr> & filters,
777  std::function<void()> onCompletion);
778 
779  void requestTransportFiltersAsync(
780  FilterPtr filterPtr,
781  std::function<void()> onCompletion);
782 
783  void setMessageFilters(const std::vector<FilterPtr> &filters);
784  void setMessageFilters();
785  void setMessageFilters(FilterPtr filterPtr);
786 
787  const std::vector<FilterPtr> &getMessageFilters();
788 
789  std::vector<char> & getRetValVec();
790 
791 
792  void setupProxiedConnection(const std::string& proxyEndpointName);
793 
794  private:
795  std::string mProxyEndpointName;
796 
797  private:
798 
799  RemoteCallMode mRemoteCallMode;
800  SerializationProtocol mProtocol;
801  std::string mEndpointName;
802  std::string mServerBindingName;
803  std::string mInterfaceName;
804 
805  unsigned int mRemoteCallTimeoutMs;
806  unsigned int mConnectTimeoutMs;
807  bool mAutoReconnect;
808  bool mConnected;
809  std::size_t mTries;
810 
811  EndpointPtr mEndpoint;
812  ClientTransportUniquePtr mTransport;
813 
814  std::vector<FilterPtr> mMessageFilters;
815 
816  RemoteCallProgressCallback mProgressCallback;
817  unsigned int mProgressCallbackIntervalMs = 0;
818 
819 
820  bool mAutoVersioning;
821  std::uint32_t mRuntimeVersion;
822  std::uint32_t mArchiveVersion;
823 
824  bool mEnableSfPointerTracking;
825  bool mEnableNativeWstringSerialization = false;
826 
827  std::vector<I_Future *> mFutures;
828 
829  MethodInvocationRequest mRequest;
830  SerializationProtocolIn mIn;
831  SerializationProtocolOut mOut;
832 
833  bool mAsync;
834  AsyncOpType mAsyncOpType;
835  std::function<void()> mAsyncCallback;
836  std::unique_ptr<Exception> mAsyncException;
837  unsigned int mEndTimeMs;
838  bool mRetry;
839  RemoteCallMode mRcs;
840  ByteBuffer mEncodedByteBuffer;
841  std::vector<ByteBuffer> mEncodedByteBuffers;
842 
843  std::vector<char> mRetValVec;
844  std::vector<char> mParametersVec;
845  I_Parameters * mpParameters;
846 
847  std::uint32_t mPingBackIntervalMs;
848  std::uint32_t mPingBackTimeStamp;
849  std::size_t mPingBackCount;
850 
851  std::uint32_t mNextTimerCallbackMs;
852  std::uint32_t mNextPingBackCheckMs;
853  std::uint32_t mPingBackCheckIntervalMs;
854 
855  MutexPtr mSignalledMutexPtr;
856  ConditionPtr mSignalledConditionPtr;
857  LockPtr mSignalledLockPtr;
858 
859  bool mSignalled;
860 
861  Mutex mSubRcfClientMutex;
862  RcfClientPtr mSubRcfClientPtr;
863 
864  bool mBatchMode;
865  ReallocBufferPtr mBatchBufferPtr;
866  ReallocBuffer mBatchBufferTemp;
867  std::uint32_t mBatchMaxMessageLength;
868  std::uint32_t mBatchCount;
869  std::uint32_t mBatchMessageCount;
870 
871  // Set to true if we need to set the transport protocol without disconnecting.
872  bool mSetTransportProtocol;
873 
874 
875 #if RCF_FEATURE_FILETRANSFER==1
876  FileProgressCallback mFileProgressCb;
877 
878  std::vector<FileUpload> mUploadStreams;
879  std::vector<FileDownload> mDownloadStreams;
880 #endif
881 
882  std::uint32_t mTransferWindowS;
883 
884  RecursionState<int, int> mRecursionState;
885 
886  public:
887 
888  std::string mCurrentCallMethodName;
889  std::string mCurrentCallDesc;
890  bool mCallInProgress;
891 
892 #ifdef RCF_WINDOWS
893  private:
894  std::unique_ptr<HANDLE> mWindowsImpersonationToken;
895 #endif
896 
897  private:
898  std::string mHttpProxy;
899  int mHttpProxyPort;
900  tstring mHttpProxyRealm;
901  std::map<std::string, HttpCookie> mHttpCookies;
902  TransportProtocol mTransportProtocol;
903  tstring mUsername;
904  tstring mPassword;
905  tstring mHttpProxyUsername;
906  tstring mHttpProxyPassword;
907  std::string mHttpUrlParameterString;
908  tstring mKerberosSpn;
909  bool mEnableCompression;
910  SspiMessageProtection mSspiMessageProtection = Smp_Encryption;
911 
912  CertificatePtr mCertificatePtr;
913  CertificatePtr mCaCertificatePtr;
914  CertificateValidationCallback mCertificateValidationCb;
915  tstring mSchannelCertificateValidation;
916 
917  std::string mOpenSslCipherSuite;
918 
919  tstring mTlsSniName;
920 
921  SslImplementation mSslImplementation;
922 
923 #if RCF_FEATURE_SSPI==1
924  DWORD mSchannelEnabledProtocols = 0;
925  ULONG mSchannelContextRequirements = 0;
926 #endif
927 
928 
929  friend class HttpFrameFilter;
930  std::map<std::string, HttpCookie> & getCookieMap();
931 
932  private:
933  void requestTransportFilters_Legacy(const std::vector<FilterPtr> &filters);
934 
935  void requestTransportFiltersAsync_Legacy(
936  const std::vector<FilterPtr> &filters,
937  std::function<void()> onCompletion);
938  };
939 
940  class RCF_EXPORT CallOptions
941  {
942  public:
943  CallOptions();
944  CallOptions(RemoteCallMode rcs);
945  CallOptions(RemoteCallMode rcs, const std::function<void()> & callback);
946  CallOptions(std::function<void()> callback);
947  RemoteCallMode apply(ClientStub &clientStub) const;
948 
949  private:
950  bool mAsync;
951  bool mRcsSpecified;
952  RemoteCallMode mRcs;
953  std::function<void()> mCallback;
954  };
955 
956  class RCF_EXPORT AsyncTwoway : public CallOptions
957  {
958  public:
959  AsyncTwoway(const std::function<void()> & callback);
960  };
961 
962  class RCF_EXPORT AsyncOneway : public CallOptions
963  {
964  public:
965  AsyncOneway(const std::function<void()> & callback);
966  };
967 
968  class RestoreClientTransportGuard
969  {
970  public:
971 
972  RestoreClientTransportGuard(ClientStub &client, ClientStub &clientTemp);
973  ~RestoreClientTransportGuard();
974 
975  private:
976  ClientStub &mClient;
977  ClientStub &mClientTemp;
978  };
979 
980 } // namespace RCF
981 
982 #endif // ! INCLUDE_RCF_CLIENTSTUB_HPP
SspiMessageProtection
Definition: Enums.hpp:207
RCF_FILESYSTEM_NS::path Path
Typedef for standard C++ path type.
Definition: FileSystem.hpp:32
RCF_EXPORT std::uint32_t getArchiveVersion()
Gets the RCF archive version number.
Base class of all RcfClient<> templates.
Definition: RcfClient.hpp:45
std::function< void(const RemoteCallProgressInfo &, RemoteCallAction &)> RemoteCallProgressCallback
Describes a user-provided callback function to be called periodically on the client side...
Definition: RcfFwd.hpp:84
Client side options for downloading and uploading files.
Definition: FileStream.hpp:371
Controls the client side of a RCF connection.
Definition: ClientStub.hpp:83
std::shared_ptr< Endpoint > EndpointPtr
Reference counted wrapper for RCF::Endpoint.
Definition: RcfFwd.hpp:118
std::shared_ptr< Certificate > CertificatePtr
Reference counted wrapper for RCF::Certificate.
Definition: RcfFwd.hpp:109
SerializationProtocol
Describes which serialization implementation to use when serializing data structures for a remote cal...
Definition: Enums.hpp:167
std::unique_ptr< ClientTransport > ClientTransportUniquePtr
Unique pointer wrapper for RCF::ClientTransport.
Definition: RcfFwd.hpp:44
Base class for all client transports.
Definition: ClientTransport.hpp:75
std::function< bool(Certificate *)> CertificateValidationCallback
Describes user-provided callback functions for validating a certificate.
Definition: RcfFwd.hpp:115
RemoteCallMode
Remote call mode.
Definition: Enums.hpp:141
Provides the ability for remote calls to be executed asynchronously.
Definition: Future.hpp:51
Base class for all RCF exceptions.
Definition: Exception.hpp:64
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:132
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:61
RCF_EXPORT std::uint32_t getRuntimeVersion()
Gets the RCF runtime version number.
SslImplementation
Describes which SSL implementation to use.
Definition: Enums.hpp:85
Utility class used by RCF to determine whether a remote call should be performed synchronously or asy...
Definition: Future.hpp:35
Base class for all network endpoint types.
Definition: Endpoint.hpp:41
Base class for IP-based client transports. Provides IP-related functionality.
Definition: IpClientTransport.hpp:28
Definition: ByteBuffer.hpp:40
TransportProtocol
Describes the transport protocols used by a RCF connection. Transport protocols are layered on top of...
Definition: Enums.hpp:63
Definition: AmiIoHandler.hpp:24
TransportType
Describes the transport types used by a RCF connection.
Definition: Enums.hpp:34
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:334
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:266