AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
SecureTunnel.h
Go to the documentation of this file.
1 #pragma once
2 
8 #include <aws/crt/io/Bootstrap.h>
10 #include <aws/iotdevice/secure_tunneling.h>
12 
13 #include <future>
14 
15 namespace Aws
16 {
17  namespace Iotsecuretunneling
18  {
23  {
24  public:
25  Message(
26  const aws_secure_tunnel_message_view &raw_options,
27  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
28  Message(Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
29  Message(Crt::ByteCursor payload, Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
30  Message(
31  Crt::ByteCursor payload,
32  uint32_t connectionId,
33  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
34  Message(
35  Crt::ByteCursor serviceId,
36  Crt::ByteCursor payload,
37  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
38  Message(
39  Crt::ByteCursor serviceId,
40  uint32_t connectionId,
41  Crt::ByteCursor payload,
42  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
43 
50  Message &WithServiceId(Crt::ByteCursor serviceId) noexcept;
51 
58  Message &WithConnectionId(uint32_t connectionId) noexcept;
59 
66  Message &WithPayload(Crt::ByteCursor payload) noexcept;
67 
68  bool initializeRawOptions(aws_secure_tunnel_message_view &raw_options) noexcept;
69 
75  const Crt::Optional<Crt::ByteCursor> &getServiceId() const noexcept;
76 
82  const uint32_t &getConnectionId() const noexcept;
83 
89  const Crt::Optional<Crt::ByteCursor> &getPayload() const noexcept;
90 
91  virtual ~Message();
92  /* Do not allow direct copy or move */
93  Message(const Message &) = delete;
94  Message(Message &&) noexcept = delete;
95  Message &operator=(const Message &) = delete;
96  Message &operator=(Message &&) noexcept = delete;
97 
98  private:
99  Crt::Allocator *m_allocator;
100 
106  Crt::Optional<Crt::ByteCursor> m_serviceId;
107 
113  uint32_t m_connectionId;
114 
118  Crt::Optional<Crt::ByteCursor> m_payload;
119 
121  // Underlying data storage for internal use
123  Crt::ByteBuf m_payloadStorage;
124  Crt::ByteBuf m_serviceIdStorage;
125  };
126 
131  {
132  MessageReceivedEventData() : message(nullptr) {}
133  std::shared_ptr<Message> message;
134  };
135 
140  {
141  public:
143  enum aws_secure_tunnel_message_type type,
144  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
145 
151  const Crt::ByteCursor &getMessageType() const noexcept;
152 
153  virtual ~SendMessageCompleteData();
154  /* Do not allow direct copy or move */
157  SendMessageCompleteData &operator=(const SendMessageCompleteData &) = delete;
158  SendMessageCompleteData &operator=(SendMessageCompleteData &&) noexcept = delete;
159 
160  private:
161  Crt::Allocator *m_allocator;
162 
167  Crt::ByteCursor m_messageType;
168 
170  // Underlying data storage for internal use
172  Crt::ByteBuf m_messageTypeStorage;
173  };
174 
179  {
180  SendMessageCompleteEventData() : sendMessageCompleteData(nullptr) {}
181  std::shared_ptr<SendMessageCompleteData> sendMessageCompleteData;
182  };
183 
188  {
189  public:
191  const aws_secure_tunnel_connection_view &raw_options,
192  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
193 
199  const Crt::Optional<Crt::ByteCursor> &getServiceId1() const noexcept;
200 
206  const Crt::Optional<Crt::ByteCursor> &getServiceId2() const noexcept;
207 
213  const Crt::Optional<Crt::ByteCursor> &getServiceId3() const noexcept;
214 
215  virtual ~ConnectionData();
216  /* Do not allow direct copy or move */
217  ConnectionData(const ConnectionData &) = delete;
218  ConnectionData(ConnectionData &&) noexcept = delete;
219  ConnectionData &operator=(const ConnectionData &) = delete;
220  ConnectionData &operator=(ConnectionData &&) noexcept = delete;
221 
222  private:
223  Crt::Allocator *m_allocator;
224 
230  Crt::Optional<Crt::ByteCursor> m_serviceId1;
231 
235  Crt::Optional<Crt::ByteCursor> m_serviceId2;
236 
240  Crt::Optional<Crt::ByteCursor> m_serviceId3;
241 
243  // Underlying data storage for internal use
245  Crt::ByteBuf m_serviceId1Storage;
246  Crt::ByteBuf m_serviceId2Storage;
247  Crt::ByteBuf m_serviceId3Storage;
248  };
249 
254  {
255  ConnectionSuccessEventData() : connectionData(nullptr) {}
256  std::shared_ptr<ConnectionData> connectionData;
257  };
258 
263  {
264  public:
266  const aws_secure_tunnel_message_view &raw_options,
267  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
268 
274  const Crt::Optional<Crt::ByteCursor> &getServiceId() const noexcept;
275 
281  const uint32_t &getConnectionId() const noexcept;
282 
283  virtual ~StreamStartedData();
284  /* Do not allow direct copy or move */
286  StreamStartedData(StreamStartedData &&) noexcept = delete;
287  StreamStartedData &operator=(const StreamStartedData &) = delete;
288  StreamStartedData &operator=(StreamStartedData &&) noexcept = delete;
289 
290  private:
291  Crt::Allocator *m_allocator;
292 
298  Crt::Optional<Crt::ByteCursor> m_serviceId;
299 
305  uint32_t m_connectionId;
306 
308  // Underlying data storage for internal use
310  Crt::ByteBuf m_serviceIdStorage;
311  };
312 
317  {
318  StreamStartedEventData() : streamStartedData(nullptr) {}
319  std::shared_ptr<StreamStartedData> streamStartedData;
320  };
321 
326  {
327  public:
329  const aws_secure_tunnel_message_view &raw_options,
330  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
331 
337  const Crt::Optional<Crt::ByteCursor> &getServiceId() const noexcept;
338 
339  virtual ~StreamStoppedData();
340  /* Do not allow direct copy or move */
342  StreamStoppedData(StreamStoppedData &&) noexcept = delete;
343  StreamStoppedData &operator=(const StreamStoppedData &) = delete;
344  StreamStoppedData &operator=(StreamStoppedData &&) noexcept = delete;
345 
346  private:
347  Crt::Allocator *m_allocator;
348 
354  Crt::Optional<Crt::ByteCursor> m_serviceId;
355 
357  // Underlying data storage for internal use
359  Crt::ByteBuf m_serviceIdStorage;
360  };
361 
366  {
367  StreamStoppedEventData() : streamStoppedData(nullptr) {}
368  std::shared_ptr<StreamStoppedData> streamStoppedData;
369  };
370 
375  {
376  public:
378  const aws_secure_tunnel_message_view &raw_options,
379  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
380 
386  const Crt::Optional<Crt::ByteCursor> &getServiceId() const noexcept;
387 
393  const uint32_t &getConnectionId() const noexcept;
394 
395  virtual ~ConnectionStartedData();
396  /* Do not allow direct copy or move */
399  ConnectionStartedData &operator=(const ConnectionStartedData &) = delete;
400  ConnectionStartedData &operator=(ConnectionStartedData &&) noexcept = delete;
401 
402  private:
403  Crt::Allocator *m_allocator;
404 
410  Crt::Optional<Crt::ByteCursor> m_serviceId;
411 
416  uint32_t m_connectionId;
417 
419  // Underlying data storage for internal use
421  Crt::ByteBuf m_serviceIdStorage;
422  };
423 
428  {
429  ConnectionStartedEventData() : connectionStartedData(nullptr) {}
430  std::shared_ptr<ConnectionStartedData> connectionStartedData;
431  };
432 
437  {
438  public:
440  const aws_secure_tunnel_message_view &raw_options,
441  Crt::Allocator *allocator = Crt::ApiAllocator()) noexcept;
442 
448  const Crt::Optional<Crt::ByteCursor> &getServiceId() const noexcept;
449 
455  const uint32_t &getConnectionId() const noexcept;
456 
457  virtual ~ConnectionResetData();
458  /* Do not allow direct copy or move */
461  ConnectionResetData &operator=(const ConnectionResetData &) = delete;
462  ConnectionResetData &operator=(ConnectionResetData &&) noexcept = delete;
463 
464  private:
465  Crt::Allocator *m_allocator;
466 
472  Crt::Optional<Crt::ByteCursor> m_serviceId;
473 
478  uint32_t m_connectionId;
479 
481  // Underlying data storage for internal use
483  Crt::ByteBuf m_serviceIdStorage;
484  };
485 
490  {
491  ConnectionResetEventData() : connectionResetData(nullptr) {}
492  std::shared_ptr<ConnectionResetData> connectionResetData;
493  };
494 
495  class SecureTunnel;
496 
497  // Client callback type definitions
498 
503  using OnConnectionSuccess = std::function<void(SecureTunnel *secureTunnel, const ConnectionSuccessEventData &)>;
504 
509  using OnConnectionFailure = std::function<void(SecureTunnel *secureTunnel, int errorCode)>;
510 
514  using OnConnectionShutdown = std::function<void(void)>;
515 
520  std::function<void(SecureTunnel *secureTunnel, int errorCode, const SendMessageCompleteEventData &)>;
521 
525  using OnMessageReceived = std::function<void(SecureTunnel *secureTunnel, const MessageReceivedEventData &)>;
526 
532  std::function<void(SecureTunnel *secureTunnel, int errorCode, const StreamStartedEventData &)>;
533 
537  using OnStreamStopped = std::function<void(SecureTunnel *secureTunnel, const StreamStoppedEventData &)>;
538 
544  std::function<void(SecureTunnel *secureTunnel, int errorCode, const ConnectionStartedEventData &)>;
545 
550  std::function<void(SecureTunnel *secureTunnel, int errorCode, const ConnectionResetEventData &)>;
551 
555  using OnSessionReset = std::function<void(void)>;
556 
560  using OnStopped = std::function<void(SecureTunnel *secureTunnel)>;
561 
565  using OnConnectionComplete = std::function<void(void)>;
569  using OnDataReceive = std::function<void(const Crt::ByteBuf &data)>;
573  using OnStreamStart = std::function<void()>;
577  using OnStreamReset = std::function<void(void)>;
581  using OnSendDataComplete = std::function<void(int errorCode)>;
582 
587  {
588  public:
593  Crt::Allocator *allocator, // Should out live this object
594  Crt::Io::ClientBootstrap &clientBootstrap, // Should out live this object
595  const Crt::Io::SocketOptions &socketOptions, // Make a copy and save in this object
596  const std::string &accessToken, // Make a copy and save in this object
597  aws_secure_tunneling_local_proxy_mode localProxyMode,
598  const std::string &endpointHost); // Make a copy and save in this object
599 
604  Crt::Allocator *allocator, // Should out live this object
605  const Crt::Io::SocketOptions &socketOptions, // Make a copy and save in this object
606  const std::string &accessToken, // Make a copy and save in this object
607  aws_secure_tunneling_local_proxy_mode localProxyMode,
608  const std::string &endpointHost); // Make a copy and save in this object
609 
614  Crt::Allocator *allocator, // Should out live this object
615  const std::string &accessToken, // Make a copy and save in this object
616  aws_secure_tunneling_local_proxy_mode localProxyMode,
617  const std::string &endpointHost); // Make a copy and save in this object
618 
619  /* Optional members */
620 
629  SecureTunnelBuilder &WithTlsConnectionOptions(const Crt::Io::TlsConnectionOptions &tslOptions);
630 
638  SecureTunnelBuilder &WithRootCa(const std::string &rootCa);
639 
647  SecureTunnelBuilder &WithClientToken(const std::string &clientToken);
648 
656  SecureTunnelBuilder &WithHttpClientConnectionProxyOptions(
657  const Crt::Http::HttpClientConnectionProxyOptions &httpClientConnectionProxyOptions);
658 
667  SecureTunnelBuilder &WithOnConnectionSuccess(OnConnectionSuccess onConnectionSuccess);
668 
676  SecureTunnelBuilder &WithOnConnectionFailure(OnConnectionFailure onConnectionFailure);
677 
685  SecureTunnelBuilder &WithOnConnectionShutdown(OnConnectionShutdown onConnectionShutdown);
686 
695  SecureTunnelBuilder &WithOnSendMessageComplete(OnSendMessageComplete onSendMessageComplete);
696 
705  SecureTunnelBuilder &WithOnMessageReceived(OnMessageReceived onMessageReceived);
706 
715  SecureTunnelBuilder &WithOnStreamStarted(OnStreamStarted onStreamStarted);
716 
724  SecureTunnelBuilder &WithOnStreamStopped(OnStreamStopped onStreamStopped);
725 
734  SecureTunnelBuilder &WithOnConnectionStarted(OnConnectionStarted onConnectionStarted);
735 
743  SecureTunnelBuilder &WithOnConnectionReset(OnConnectionReset onConnectionReset);
744 
752  SecureTunnelBuilder &WithOnStreamReset(OnStreamReset onStreamReset);
753 
762  SecureTunnelBuilder &WithOnSessionReset(OnSessionReset onSessionReset);
763 
771  SecureTunnelBuilder &WithOnStopped(OnStopped onStopped);
772 
776  SecureTunnelBuilder &WithOnDataReceive(OnDataReceive onDataReceive);
780  SecureTunnelBuilder &WithOnConnectionComplete(OnConnectionComplete onConnectionComplete);
784  SecureTunnelBuilder &WithOnStreamStart(OnStreamStart onStreamStart);
788  SecureTunnelBuilder &WithOnSendDataComplete(OnSendDataComplete onSendDataComplete);
789 
796  std::shared_ptr<SecureTunnel> Build() noexcept;
797 
798  private:
799  /* Required Memebers */
800 
801  Crt::Allocator *m_allocator;
802 
806  Crt::Io::ClientBootstrap *m_clientBootstrap;
807 
812  Crt::Io::SocketOptions m_socketOptions;
813 
819  std::string m_accessToken;
820 
824  aws_secure_tunneling_local_proxy_mode m_localProxyMode;
825 
829  std::string m_endpointHost;
830 
831  /* Optional members */
837  std::string m_clientToken;
838 
843  Crt::Optional<Crt::Io::TlsConnectionOptions> m_tlsConnectionOptions;
844 
848  std::string m_rootCa;
849 
853  Crt::Optional<Crt::Http::HttpClientConnectionProxyOptions> m_httpClientConnectionProxyOptions;
854 
855  /* Callbacks */
860  OnConnectionSuccess m_OnConnectionSuccess;
861 
862  /* Callbacks */
867  OnConnectionFailure m_OnConnectionFailure;
868 
872  OnConnectionShutdown m_OnConnectionShutdown;
873 
877  OnSendMessageComplete m_OnSendMessageComplete;
878 
885  OnMessageReceived m_OnMessageReceived;
886 
894  OnStreamStarted m_OnStreamStarted;
895 
902  OnStreamStopped m_OnStreamStopped;
903 
911  OnConnectionStarted m_OnConnectionStarted;
912 
919  OnConnectionReset m_OnConnectionReset;
920 
924  OnSessionReset m_OnSessionReset;
925 
929  OnStopped m_OnStopped;
930 
934  OnConnectionComplete m_OnConnectionComplete;
938  OnDataReceive m_OnDataReceive;
942  OnStreamStart m_OnStreamStart;
946  OnStreamReset m_OnStreamReset;
950  OnSendDataComplete m_OnSendDataComplete;
951 
952  friend class SecureTunnel;
953  };
954 
956  {
957  public:
958  SecureTunnel(
959  Crt::Allocator *allocator, // Should out live this object
960  Crt::Io::ClientBootstrap *clientBootstrap, // Should out live this object
961  const Crt::Io::SocketOptions &socketOptions, // Make a copy and save in this object
962 
963  const std::string &accessToken, // Make a copy and save in this object
964  aws_secure_tunneling_local_proxy_mode localProxyMode,
965  const std::string &endpointHost, // Make a copy and save in this object
966  const std::string &rootCa, // Make a copy and save in this object
967 
968  OnConnectionComplete onConnectionComplete,
969  OnConnectionShutdown onConnectionShutdown,
970  OnSendDataComplete onSendDataComplete,
971  OnDataReceive onDataReceive,
972  OnStreamStart onStreamStart,
973  OnStreamReset onStreamReset,
974  OnSessionReset onSessionReset);
975 
976  SecureTunnel(
977  Crt::Allocator *allocator, // Should out live this object
978  const Crt::Io::SocketOptions &socketOptions, // Make a copy and save in this object
979 
980  const std::string &accessToken, // Make a copy and save in this object
981  aws_secure_tunneling_local_proxy_mode localProxyMode,
982  const std::string &endpointHost, // Make a copy and save in this object
983  const std::string &rootCa, // Make a copy and save in this object
984 
985  OnConnectionComplete onConnectionComplete,
986  OnConnectionShutdown onConnectionShutdown,
987  OnSendDataComplete onSendDataComplete,
988  OnDataReceive onDataReceive,
989  OnStreamStart onStreamStart,
990  OnStreamReset onStreamReset,
991  OnSessionReset onSessionReset);
992 
993  virtual ~SecureTunnel();
994  SecureTunnel(const SecureTunnel &) = delete;
995  SecureTunnel &operator=(const SecureTunnel &) = delete;
996 
997  SecureTunnel(SecureTunnel &&) noexcept;
998  SecureTunnel &operator=(SecureTunnel &&) noexcept;
999 
1000  bool IsValid();
1001 
1008  int Start();
1009 
1016  int Stop();
1017 
1025  int SendMessage(std::shared_ptr<Message> messageOptions) noexcept;
1026 
1027  /* SOURCE MODE ONLY */
1034  int SendStreamStart();
1035 
1044  int SendStreamStart(std::string serviceId);
1045 
1054  int SendStreamStart(Crt::ByteCursor serviceId);
1055 
1066  int SendStreamStart(std::string serviceId, uint32_t connectionId);
1067 
1078  int SendStreamStart(Crt::ByteCursor serviceId, uint32_t connectionId);
1079 
1087  int SendConnectionStart(uint32_t connectionId);
1088 
1098  int SendConnectionStart(std::string serviceId, uint32_t connectionId);
1099 
1109  int SendConnectionStart(Crt::ByteCursor serviceId, uint32_t connectionId);
1110 
1111  aws_secure_tunnel *GetUnderlyingHandle();
1112 
1116  int Connect();
1117 
1121  int Close();
1122 
1126  void Shutdown();
1127 
1131  int SendData(const Crt::ByteCursor &data);
1132 
1133  /* Should not be exposed. Under the hood only operation. */
1134  int SendStreamReset();
1135 
1136  private:
1141  SecureTunnel(
1142  Crt::Allocator *allocator,
1143  Crt::Io::ClientBootstrap *clientBootstrap,
1144  const Crt::Io::SocketOptions &socketOptions,
1145  const std::string &accessToken,
1146  const std::string &clientToken,
1147  aws_secure_tunneling_local_proxy_mode localProxyMode,
1148  const std::string &endpointHost,
1149 
1150  Crt::Io::TlsConnectionOptions *tslOptions,
1151  const std::string &rootCa,
1152  Crt::Http::HttpClientConnectionProxyOptions *httpClientConnectionProxyOptions,
1153 
1154  OnConnectionSuccess onConnectionSuccess,
1155  OnConnectionFailure onConnectionFailure,
1156  OnConnectionComplete onConnectionComplete, /* Deprecated */
1157  OnConnectionShutdown onConnectionShutdown,
1158  OnSendMessageComplete onSendMessageComplete,
1159  OnSendDataComplete onSendDataComplete, /* Deprecated */
1160  OnMessageReceived onMessageReceived,
1161  OnDataReceive onDataReceive, /* Deprecated */
1162  OnStreamStarted onStreamStarted,
1163  OnStreamStart onStreamStart, /* Deprecated */
1164  OnStreamStopped onStreamStopped,
1165  OnStreamReset onStreamReset, /* Deprecated */
1166  OnConnectionStarted onConnectionStarted,
1167  OnConnectionReset onConnectionReset,
1168  OnSessionReset onSessionReset,
1169  OnStopped onStopped);
1170 
1171  /* Static Callbacks */
1172  static void s_OnMessageReceived(const struct aws_secure_tunnel_message_view *message, void *user_data);
1173  static void s_OnConnectionComplete(
1174  const struct aws_secure_tunnel_connection_view *connection,
1175  int error_code,
1176  void *user_data);
1177  static void s_OnConnectionFailure(int error_code, void *user_data);
1178  static void s_OnConnectionShutdown(int error_code, void *user_data);
1179  static void s_OnSendDataComplete(int error_code, void *user_data);
1180  static void s_OnSendMessageComplete(
1181  enum aws_secure_tunnel_message_type type,
1182  int error_code,
1183  void *user_data);
1184  static void s_OnStreamStopped(
1185  const struct aws_secure_tunnel_message_view *message,
1186  int error_code,
1187  void *user_data);
1188  static void s_OnSessionReset(void *user_data);
1189  static void s_OnStopped(void *user_data);
1190  static void s_OnTerminationComplete(void *user_data);
1191  static void s_OnStreamStarted(
1192  const struct aws_secure_tunnel_message_view *message,
1193  int error_code,
1194  void *user_data);
1195  static void s_OnConnectionStarted(
1196  const struct aws_secure_tunnel_message_view *message,
1197  int error_code,
1198  void *user_data);
1199  static void s_OnConnectionReset(
1200  const struct aws_secure_tunnel_message_view *message,
1201  int error_code,
1202  void *user_data);
1203 
1204  void OnTerminationComplete();
1205 
1209  OnMessageReceived m_OnMessageReceived;
1210 
1215  OnConnectionSuccess m_OnConnectionSuccess;
1216 
1220  OnConnectionFailure m_OnConnectionFailure;
1221 
1225  OnConnectionShutdown m_OnConnectionShutdown;
1226 
1230  OnSendMessageComplete m_OnSendMessageComplete;
1231 
1236  OnStreamStarted m_OnStreamStarted;
1237 
1241  OnStreamStopped m_OnStreamStopped;
1242 
1247  OnConnectionStarted m_OnConnectionStarted;
1248 
1252  OnConnectionReset m_OnConnectionReset;
1253 
1257  OnSessionReset m_OnSessionReset;
1258 
1262  OnStopped m_OnStopped;
1263 
1264  aws_secure_tunnel *m_secure_tunnel;
1265  Crt::Allocator *m_allocator;
1266 
1270  OnDataReceive m_OnDataReceive;
1274  OnConnectionComplete m_OnConnectionComplete;
1278  OnStreamStart m_OnStreamStart;
1282  OnStreamReset m_OnStreamReset;
1286  OnSendDataComplete m_OnSendDataComplete;
1287 
1288  std::shared_ptr<SecureTunnel> m_selfRef;
1289 
1290  friend class SecureTunnelBuilder;
1291  };
1292  } // namespace Iotsecuretunneling
1293 } // namespace Aws
Aws::Iotsecuretunneling::SecureTunnel::operator=
SecureTunnel & operator=(const SecureTunnel &)=delete
Aws::Iotsecuretunneling::StreamStartedEventData::streamStartedData
std::shared_ptr< StreamStartedData > streamStartedData
Definition: SecureTunnel.h:319
Aws::Iotsecuretunneling::StreamStoppedData::StreamStoppedData
StreamStoppedData(const StreamStoppedData &)=delete
Aws::Iotsecuretunneling::OnConnectionStarted
std::function< void(SecureTunnel *secureTunnel, int errorCode, const ConnectionStartedEventData &)> OnConnectionStarted
Definition: SecureTunnel.h:544
Aws::Iotsecuretunneling::ConnectionSuccessEventData::connectionData
std::shared_ptr< ConnectionData > connectionData
Definition: SecureTunnel.h:256
Aws::Iotsecuretunneling::SendMessageCompleteData::SendMessageCompleteData
SendMessageCompleteData(const SendMessageCompleteData &)=delete
Aws::Iotsecuretunneling::OnConnectionShutdown
std::function< void(void)> OnConnectionShutdown
Definition: SecureTunnel.h:514
Aws::Crt::ApiAllocator
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
Aws::Iotsecuretunneling::Message::Message
Message(const Message &)=delete
Aws::Iotsecuretunneling::SendMessageCompleteData::SendMessageCompleteData
SendMessageCompleteData(SendMessageCompleteData &&) noexcept=delete
Aws::Iotsecuretunneling::ConnectionStartedEventData::connectionStartedData
std::shared_ptr< ConnectionStartedData > connectionStartedData
Definition: SecureTunnel.h:430
Aws::Iotsecuretunneling::ConnectionStartedEventData
Definition: SecureTunnel.h:428
Aws::Iotsecuretunneling::StreamStoppedEventData
Definition: SecureTunnel.h:366
Aws::Iotsecuretunneling::SendMessageCompleteEventData
Definition: SecureTunnel.h:179
Aws::Iotsecuretunneling::ConnectionResetData
Definition: SecureTunnel.h:437
Aws::Iotsecuretunneling::SecureTunnelBuilder
Definition: SecureTunnel.h:587
Aws::Iotsecuretunneling::OnConnectionReset
std::function< void(SecureTunnel *secureTunnel, int errorCode, const ConnectionResetEventData &)> OnConnectionReset
Definition: SecureTunnel.h:550
Aws::Iotsecuretunneling::OnStreamStopped
std::function< void(SecureTunnel *secureTunnel, const StreamStoppedEventData &)> OnStreamStopped
Definition: SecureTunnel.h:537
Aws::Iotsecuretunneling::ConnectionResetEventData::connectionResetData
std::shared_ptr< ConnectionResetData > connectionResetData
Definition: SecureTunnel.h:492
Aws::Iotsecuretunneling::OnConnectionFailure
std::function< void(SecureTunnel *secureTunnel, int errorCode)> OnConnectionFailure
Definition: SecureTunnel.h:509
Aws::Crt::Io::TlsConnectionOptions
Definition: TlsOptions.h:293
Aws::Iotsecuretunneling::OnStreamStart
std::function< void()> OnStreamStart
Definition: SecureTunnel.h:573
Aws::Iotsecuretunneling::StreamStoppedData::StreamStoppedData
StreamStoppedData(StreamStoppedData &&) noexcept=delete
HttpConnection.h
Aws::Iotsecuretunneling::ConnectionData::ConnectionData
ConnectionData(const ConnectionData &)=delete
Aws::Iotsecuretunneling::OnStreamReset
std::function< void(void)> OnStreamReset
Definition: SecureTunnel.h:577
Aws::Iotsecuretunneling::ConnectionStartedEventData::ConnectionStartedEventData
ConnectionStartedEventData()
Definition: SecureTunnel.h:429
Aws::Iotsecuretunneling::ConnectionResetEventData::ConnectionResetEventData
ConnectionResetEventData()
Definition: SecureTunnel.h:491
Aws::Iotsecuretunneling::StreamStoppedEventData::StreamStoppedEventData
StreamStoppedEventData()
Definition: SecureTunnel.h:367
Aws::Iotsecuretunneling::StreamStartedEventData
Definition: SecureTunnel.h:317
Aws::Iotsecuretunneling::ConnectionStartedData
Definition: SecureTunnel.h:375
Aws::Iotsecuretunneling::MessageReceivedEventData::MessageReceivedEventData
MessageReceivedEventData()
Definition: SecureTunnel.h:132
AWS_IOTSECURETUNNELING_API
#define AWS_IOTSECURETUNNELING_API
Definition: Exports.h:30
Aws::Iotsecuretunneling::StreamStoppedData
Definition: SecureTunnel.h:326
Aws::Iotsecuretunneling::MessageReceivedEventData
Definition: SecureTunnel.h:131
Aws::Iotsecuretunneling::ConnectionStartedData::ConnectionStartedData
ConnectionStartedData(ConnectionStartedData &&) noexcept=delete
Aws::Crt::Optional< Crt::ByteCursor >
Aws::Iotsecuretunneling::OnSessionReset
std::function< void(void)> OnSessionReset
Definition: SecureTunnel.h:555
Aws::Iotsecuretunneling::SecureTunnel::SecureTunnel
SecureTunnel(const SecureTunnel &)=delete
Aws::Iotsecuretunneling::OnConnectionSuccess
std::function< void(SecureTunnel *secureTunnel, const ConnectionSuccessEventData &)> OnConnectionSuccess
Definition: SecureTunnel.h:503
Aws::Iotsecuretunneling::StreamStartedData::StreamStartedData
StreamStartedData(StreamStartedData &&) noexcept=delete
Aws::Iotsecuretunneling::StreamStartedData
Definition: SecureTunnel.h:263
Aws::Iotsecuretunneling::ConnectionResetEventData
Definition: SecureTunnel.h:490
Aws::Iotsecuretunneling::StreamStartedEventData::StreamStartedEventData
StreamStartedEventData()
Definition: SecureTunnel.h:318
Aws::Iotsecuretunneling::ConnectionData
Definition: SecureTunnel.h:188
Aws::Crt::Http::HttpClientConnectionProxyOptions
Definition: HttpConnection.h:270
Aws::Crt::Io::SocketOptions
Definition: SocketOptions.h:48
Aws::Iotsecuretunneling::OnStopped
std::function< void(SecureTunnel *secureTunnel)> OnStopped
Definition: SecureTunnel.h:560
Aws::Crt::ByteBuf
aws_byte_buf ByteBuf
Definition: Types.h:30
std
Definition: StringView.h:852
Aws::Iotsecuretunneling::ConnectionData::ConnectionData
ConnectionData(ConnectionData &&) noexcept=delete
Aws::Iotsecuretunneling::ConnectionResetData::ConnectionResetData
ConnectionResetData(ConnectionResetData &&) noexcept=delete
Aws
Definition: Allocator.h:11
Aws::Iotsecuretunneling::SendMessageCompleteEventData::sendMessageCompleteData
std::shared_ptr< SendMessageCompleteData > sendMessageCompleteData
Definition: SecureTunnel.h:181
Aws::Iotsecuretunneling::OnMessageReceived
std::function< void(SecureTunnel *secureTunnel, const MessageReceivedEventData &)> OnMessageReceived
Definition: SecureTunnel.h:525
SocketOptions.h
Aws::Iotsecuretunneling::ConnectionResetData::ConnectionResetData
ConnectionResetData(const ConnectionResetData &)=delete
Aws::Iotsecuretunneling::OnSendMessageComplete
std::function< void(SecureTunnel *secureTunnel, int errorCode, const SendMessageCompleteEventData &)> OnSendMessageComplete
Definition: SecureTunnel.h:520
Bootstrap.h
Aws::Crt::ByteCursor
aws_byte_cursor ByteCursor
Definition: Types.h:31
Aws::Iotsecuretunneling::OnStreamStarted
std::function< void(SecureTunnel *secureTunnel, int errorCode, const StreamStartedEventData &)> OnStreamStarted
Definition: SecureTunnel.h:532
Aws::Crt::Allocator
aws_allocator Allocator
Definition: Allocator.h:14
Aws::Iotsecuretunneling::Message
Definition: SecureTunnel.h:23
Aws::Iotsecuretunneling::SendMessageCompleteEventData::SendMessageCompleteEventData
SendMessageCompleteEventData()
Definition: SecureTunnel.h:180
Aws::Iotsecuretunneling::OnConnectionComplete
std::function< void(void)> OnConnectionComplete
Definition: SecureTunnel.h:565
Aws::Iotsecuretunneling::OnDataReceive
std::function< void(const Crt::ByteBuf &data)> OnDataReceive
Definition: SecureTunnel.h:569
Aws::Iotsecuretunneling::MessageReceivedEventData::message
std::shared_ptr< Message > message
Definition: SecureTunnel.h:133
Aws::Crt::Io::ClientBootstrap
Definition: Bootstrap.h:35
Exports.h
Aws::Iotsecuretunneling::ConnectionSuccessEventData
Definition: SecureTunnel.h:254
Aws::Iotsecuretunneling::OnSendDataComplete
std::function< void(int errorCode)> OnSendDataComplete
Definition: SecureTunnel.h:581
Aws::Iotsecuretunneling::SendMessageCompleteData
Definition: SecureTunnel.h:140
Aws::Iotsecuretunneling::StreamStartedData::StreamStartedData
StreamStartedData(const StreamStartedData &)=delete
Aws::Iotsecuretunneling::Message::Message
Message(Message &&) noexcept=delete
Aws::Iotsecuretunneling::SecureTunnel
Definition: SecureTunnel.h:956
Aws::Iotsecuretunneling::StreamStoppedEventData::streamStoppedData
std::shared_ptr< StreamStoppedData > streamStoppedData
Definition: SecureTunnel.h:368
Aws::Iotsecuretunneling::ConnectionSuccessEventData::ConnectionSuccessEventData
ConnectionSuccessEventData()
Definition: SecureTunnel.h:255
Aws::Iotsecuretunneling::ConnectionStartedData::ConnectionStartedData
ConnectionStartedData(const ConnectionStartedData &)=delete