AWS IoT Device SDK C++ v2
1.45.2
AWS IoT Device SDK C++ v2
Toggle main menu visibility
Loading...
Searching...
No Matches
crt
aws-crt-cpp
include
aws
crt
io
Socks5.h
Go to the documentation of this file.
1
#pragma once
2
7
8
#include <
aws/crt/ByteBufUtils.h
>
9
10
#include <chrono>
11
12
struct
aws_socks5_proxy_negotiation_strategy;
13
14
namespace
Aws
15
{
16
namespace
Crt
17
{
18
namespace
Io
19
{
20
class
Socks5ProxyOptions
;
21
27
class
AWS_CRT_CPP_API
Socks5BasicAuthOptions
28
{
29
public
:
36
Socks5BasicAuthOptions
&
withUsername
(
ManagedByteBuffer
username)
noexcept
37
{
38
m_username = std::move(username);
39
return
*
this
;
40
}
41
48
Socks5BasicAuthOptions
&
withPassword
(
ManagedByteBuffer
password)
noexcept
49
{
50
m_password = std::move(password);
51
return
*
this
;
52
}
53
59
const
ManagedByteBuffer
&
getUsername
() const noexcept {
return
m_username; }
60
66
const
ManagedByteBuffer
&
getPassword
() const noexcept {
return
m_password; }
67
68
private
:
69
ManagedByteBuffer
m_username;
70
ManagedByteBuffer
m_password;
71
};
72
77
class
AWS_CRT_CPP_API
Socks5ProxyNegotiationStrategy
78
{
79
public
:
80
Socks5ProxyNegotiationStrategy
() noexcept = delete;
81
Socks5ProxyNegotiationStrategy
(const
Socks5ProxyNegotiationStrategy
&rhs) noexcept = delete;
82
Socks5ProxyNegotiationStrategy
(
Socks5ProxyNegotiationStrategy
&&rhs) noexcept = delete;
83
Socks5ProxyNegotiationStrategy
&operator=(const
Socks5ProxyNegotiationStrategy
&rhs) noexcept = delete;
84
Socks5ProxyNegotiationStrategy
&operator=(
Socks5ProxyNegotiationStrategy
&&rhs) noexcept = delete;
85
86
~
Socks5ProxyNegotiationStrategy
();
87
95
static
std
::shared_ptr<
Socks5ProxyNegotiationStrategy
>
newStrategyNoAuth
(
96
Allocator
*allocator =
ApiAllocator
());
97
106
static
std
::shared_ptr<
Socks5ProxyNegotiationStrategy
>
newStrategyBasicAuth
(
107
const
Socks5BasicAuthOptions
&options,
108
Allocator
*allocator =
ApiAllocator
());
109
117
struct aws_socks5_proxy_negotiation_strategy *
get
()
const
{
return
m_strategy; }
118
119
private
:
120
Socks5ProxyNegotiationStrategy
(
struct
aws_socks5_proxy_negotiation_strategy *strategy)
noexcept
;
121
122
struct
aws_socks5_proxy_negotiation_strategy *m_strategy;
123
};
124
128
class
AWS_CRT_CPP_API
Socks5ProxyOptions
129
{
130
public
:
138
Socks5ProxyOptions
(
139
const
Aws::Crt::String
&
proxyHost
,
140
uint16_t
proxyPort
,
141
std::shared_ptr<Socks5ProxyNegotiationStrategy>
strategy
)
noexcept
;
142
Socks5ProxyOptions
(
const
Socks5ProxyOptions
&rhs)
noexcept
;
143
Socks5ProxyOptions
(
Socks5ProxyOptions
&&rhs)
noexcept
;
144
Socks5ProxyOptions
&
operator=
(
const
Socks5ProxyOptions
&rhs);
145
Socks5ProxyOptions
&
operator=
(
Socks5ProxyOptions
&&rhs)
noexcept
;
146
153
Socks5ProxyOptions
&
withTimeout
(std::chrono::milliseconds
timeout
)
noexcept
;
154
160
const
Aws::Crt::String
&
proxyHost
() const noexcept {
return
m_proxyHost; }
161
167
uint16_t
proxyPort
() const noexcept {
return
m_proxyPort; }
168
174
std::shared_ptr<Socks5ProxyNegotiationStrategy>
strategy
() const noexcept {
return
m_strategy; }
175
181
std::chrono::milliseconds
timeout
() const noexcept {
return
m_timeout; }
182
183
private
:
184
Aws::Crt::String
m_proxyHost;
185
uint16_t m_proxyPort;
186
187
std::shared_ptr<Socks5ProxyNegotiationStrategy> m_strategy;
188
189
std::chrono::milliseconds m_timeout;
190
};
191
192
}
// namespace Io
193
}
// namespace Crt
194
}
// namespace Aws
ByteBufUtils.h
Aws::Crt::Io::Socks5BasicAuthOptions
Definition
Socks5.h:28
Aws::Crt::Io::Socks5BasicAuthOptions::getPassword
const ManagedByteBuffer & getPassword() const noexcept
Definition
Socks5.h:66
Aws::Crt::Io::Socks5BasicAuthOptions::withPassword
Socks5BasicAuthOptions & withPassword(ManagedByteBuffer password) noexcept
Definition
Socks5.h:48
Aws::Crt::Io::Socks5BasicAuthOptions::getUsername
const ManagedByteBuffer & getUsername() const noexcept
Definition
Socks5.h:59
Aws::Crt::Io::Socks5BasicAuthOptions::withUsername
Socks5BasicAuthOptions & withUsername(ManagedByteBuffer username) noexcept
Definition
Socks5.h:36
Aws::Crt::Io::Socks5ProxyNegotiationStrategy
Definition
Socks5.h:78
Aws::Crt::Io::Socks5ProxyNegotiationStrategy::newStrategyBasicAuth
static std::shared_ptr< Socks5ProxyNegotiationStrategy > newStrategyBasicAuth(const Socks5BasicAuthOptions &options, Allocator *allocator=ApiAllocator())
Definition
Socks5.cpp:35
Aws::Crt::Io::Socks5ProxyNegotiationStrategy::newStrategyNoAuth
static std::shared_ptr< Socks5ProxyNegotiationStrategy > newStrategyNoAuth(Allocator *allocator=ApiAllocator())
Definition
Socks5.cpp:16
Aws::Crt::Io::Socks5ProxyNegotiationStrategy::Socks5ProxyNegotiationStrategy
Socks5ProxyNegotiationStrategy() noexcept=delete
Aws::Crt::Io::Socks5ProxyNegotiationStrategy::get
struct aws_socks5_proxy_negotiation_strategy * get() const
Definition
Socks5.h:117
Aws::Crt::Io::Socks5ProxyOptions
Definition
Socks5.h:129
Aws::Crt::Io::Socks5ProxyOptions::withTimeout
Socks5ProxyOptions & withTimeout(std::chrono::milliseconds timeout) noexcept
Definition
Socks5.cpp:113
Aws::Crt::Io::Socks5ProxyOptions::proxyPort
uint16_t proxyPort() const noexcept
Definition
Socks5.h:167
Aws::Crt::Io::Socks5ProxyOptions::proxyHost
const Aws::Crt::String & proxyHost() const noexcept
Definition
Socks5.h:160
Aws::Crt::Io::Socks5ProxyOptions::operator=
Socks5ProxyOptions & operator=(const Socks5ProxyOptions &rhs)
Definition
Socks5.cpp:87
Aws::Crt::Io::Socks5ProxyOptions::timeout
std::chrono::milliseconds timeout() const noexcept
Definition
Socks5.h:181
Aws::Crt::Io::Socks5ProxyOptions::strategy
std::shared_ptr< Socks5ProxyNegotiationStrategy > strategy() const noexcept
Definition
Socks5.h:174
Aws::Crt::Io::Socks5ProxyOptions::Socks5ProxyOptions
Socks5ProxyOptions(const Aws::Crt::String &proxyHost, uint16_t proxyPort, std::shared_ptr< Socks5ProxyNegotiationStrategy > strategy) noexcept
Definition
Socks5.cpp:66
Aws::Crt::ManagedByteBuffer
Definition
ByteBufUtils.h:24
AWS_CRT_CPP_API
#define AWS_CRT_CPP_API
Definition
Exports.h:36
Aws::Crt::Io
Definition
Credentials.h:23
Aws::Crt
Definition
Allocator.h:13
Aws::Crt::String
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition
Types.h:45
Aws::Crt::ApiAllocator
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition
Allocator.cpp:24
Aws::Crt::Allocator
aws_allocator Allocator
Definition
Allocator.h:14
Aws
Definition
Allocator.h:11
std
Definition
StringView.h:862
Generated by
1.17.0