AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
Go to the documentation of this file.
6 #include <aws/http/connection.h>
7 #include <aws/http/proxy.h>
8 #include <aws/http/request_response.h>
24 class ClientBootstrap;
29 class HttpClientConnection;
31 class HttpClientStream;
33 class HttpProxyStrategy;
43 std::function<void(
const std::shared_ptr<HttpClientConnection> &connection,
int errorCode)>;
65 enum aws_http_header_block headerBlock,
67 std::size_t headersCount)>;
76 std::function<void(
HttpStream &stream,
enum aws_http_header_block block)>;
144 virtual
int GetResponseStatusCode() const noexcept = 0;
155 void UpdateWindow(
std::
size_t incrementSize) noexcept;
158 aws_http_stream *m_stream;
168 static
int s_onIncomingHeaders(
169 struct aws_http_stream *stream,
170 enum aws_http_header_block headerBlock,
171 const struct aws_http_header *headerArray,
173 void *userData) noexcept;
174 static
int s_onIncomingHeaderBlockDone(
175 struct aws_http_stream *stream,
176 enum aws_http_header_block headerBlock,
177 void *userData) noexcept;
178 static
int s_onIncomingBody(
179 struct aws_http_stream *stream,
180 const struct aws_byte_cursor *data,
181 void *userData) noexcept;
182 static
void s_onStreamComplete(struct aws_http_stream *stream,
int errorCode,
void *userData) noexcept;
210 virtual int GetResponseStatusCode() const noexcept override;
217 bool Activate() noexcept;
251 Legacy = AWS_HPCT_HTTP_LEGACY,
257 Forwarding = AWS_HPCT_HTTP_FORWARD,
289 void InitializeRawProxyOptions(
struct aws_http_proxy_options &raw_options)
const;
426 Unknown = AWS_HTTP_VERSION_UNKNOWN,
427 Http1_0 = AWS_HTTP_VERSION_1_0,
428 Http1_1 = AWS_HTTP_VERSION_1_1,
429 Http2 = AWS_HTTP_VERSION_2,
456 std::shared_ptr<HttpClientStream> NewClientStream(
const HttpRequestOptions &requestOptions) noexcept;
461 bool IsOpen() const noexcept;
470 void Close() noexcept;
490 static bool CreateConnection(
502 static void s_onClientConnectionSetup(
503 struct aws_http_connection *connection,
505 void *user_data) noexcept;
506 static void s_onClientConnectionShutdown(
507 struct aws_http_connection *connection,
509 void *user_data) noexcept;
HttpVersion
Definition: HttpConnection.h:425
~HttpClientConnectionOptions()=default
OnIncomingBody onIncomingBody
Definition: HttpConnection.h:115
AwsHttpProxyConnectionType
Definition: HttpConnection.h:243
ClientStreamCallbackData()
Definition: HttpConnection.h:189
size_t InitialWindowSize
Definition: HttpConnection.h:368
HttpStream & operator=(HttpStream &&)=delete
uint32_t Port
Definition: HttpConnection.h:394
Io::SocketOptions SocketOptions
Definition: HttpConnection.h:400
String HostName
Definition: HttpConnection.h:388
AwsHttpProxyAuthenticationType
Definition: HttpConnection.h:233
HttpRequest * request
Definition: HttpConnection.h:104
HttpStream(HttpStream &&)=delete
aws_http_header HttpHeader
Definition: HttpConnection.h:34
std::function< void(HttpStream &stream, enum aws_http_header_block headerBlock, const HttpHeader *headersArray, std::size_t headersCount)> OnIncomingHeaders
Definition: HttpConnection.h:67
std::function< void(HttpStream &stream, enum aws_http_header_block block)> OnIncomingHeadersBlockDone
Definition: HttpConnection.h:76
Definition: HttpRequestResponse.h:110
HttpClientConnectionProxyOptions & operator=(const HttpClientConnectionProxyOptions &rhs)=default
String HostName
Definition: HttpConnection.h:295
HttpClientConnectionOptions & operator=(const HttpClientConnectionOptions &rhs)=default
AWS_CRT_CPP_API int LastError() noexcept
Definition: Api.cpp:422
virtual ~HttpClientConnection()=default
std::function< void(HttpStream &stream, int errorCode)> OnStreamComplete
Definition: HttpConnection.h:94
~HttpClientConnectionProxyOptions()=default
std::function< void(const std::shared_ptr< HttpClientConnection > &connection, int errorCode)> OnConnectionSetup
Definition: HttpConnection.h:43
HttpStream & operator=(const HttpStream &)=delete
std::shared_ptr< HttpStream > stream
Definition: HttpConnection.h:191
AwsHttpProxyConnectionType ProxyConnectionType
Definition: HttpConnection.h:312
bool ManualWindowManagement
Definition: HttpConnection.h:421
OnIncomingHeaders onIncomingHeaders
Definition: HttpConnection.h:109
HttpClientConnectionProxyOptions(HttpClientConnectionProxyOptions &&rhs)=default
HttpClientConnectionOptions(const HttpClientConnectionOptions &rhs)=default
HttpClientConnection & operator=(HttpClientConnection &&)=delete
Optional< Io::TlsConnectionOptions > TlsOptions
Definition: HttpConnection.h:307
String BasicAuthPassword
Definition: HttpConnection.h:340
OnConnectionSetup OnConnectionSetupCallback
Definition: HttpConnection.h:375
HttpClientConnection(const HttpClientConnection &)=delete
HttpClientConnectionOptions & operator=(HttpClientConnectionOptions &&rhs)=default
Allocator * allocator
Definition: HttpConnection.h:190
HttpClientConnection & operator=(const HttpClientConnection &)=delete
Definition: HttpConnection.h:188
Definition: Optional.h:18
std::shared_ptr< HttpProxyStrategy > ProxyStrategy
Definition: HttpConnection.h:318
Definition: HttpConnection.h:347
HttpClientStream & operator=(HttpClientStream &&)=delete
HttpClientStream & operator=(const HttpClientStream &)=delete
Definition: HttpConnection.h:436
HttpClientConnectionProxyOptions(const HttpClientConnectionProxyOptions &rhs)=default
aws_http_connection * m_connection
Definition: HttpConnection.h:496
AwsHttpProxyAuthenticationType AuthType
Definition: HttpConnection.h:328
std::function< void(HttpClientConnection &connection, int errorCode)> OnConnectionShutdown
Definition: HttpConnection.h:53
HttpClientStream(const HttpClientStream &)=delete
HttpClientConnectionOptions(HttpClientConnectionOptions &&rhs)=default
HttpClientConnection(HttpClientConnection &&)=delete
std::function< void(HttpStream &stream, const ByteCursor &data)> OnIncomingBody
Definition: HttpConnection.h:84
Definition: HttpConnection.h:270
Definition: SocketOptions.h:48
OnStreamComplete onStreamComplete
Definition: HttpConnection.h:120
Optional< Io::TlsConnectionOptions > TlsOptions
Definition: HttpConnection.h:406
Definition: StringView.h:852
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Definition: Allocator.h:11
aws_byte_cursor ByteCursor
Definition: Types.h:31
HttpClientConnectionProxyOptions & operator=(HttpClientConnectionProxyOptions &&rhs)=default
String BasicAuthUsername
Definition: HttpConnection.h:334
aws_allocator Allocator
Definition: Allocator.h:14
Definition: HttpConnection.h:128
Definition: Bootstrap.h:35
Io::ClientBootstrap * Bootstrap
Definition: HttpConnection.h:363
uint32_t Port
Definition: HttpConnection.h:301
OnIncomingHeadersBlockDone onIncomingHeadersBlockDone
Definition: HttpConnection.h:110
Definition: HttpConnection.h:198
OnConnectionShutdown OnConnectionShutdownCallback
Definition: HttpConnection.h:382
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:45
HttpStream(const HttpStream &)=delete
HttpClientStream(HttpClientStream &&)=delete
Definition: HttpConnection.h:100
Optional< HttpClientConnectionProxyOptions > ProxyOptions
Definition: HttpConnection.h:412