CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
service_point_manager.h
1
2#pragma once
3
4#include <cstdint>
5#include <system/enum_helpers.h>
6#include <system/object.h>
7#include <system/shared_ptr.h>
8
9#include <net/iweb_proxy.h>
10#include <net/secure_protocols/ssl_enum_types.h>
11#include <net/secure_protocols/ssl_stream.h>
12
13namespace System { namespace Net {
14
17{
19 SystemDefault = 0,
21 Ssl3 = 48,
23 Tls = 192,
25 Tls11 = 768,
27 Tls12 = 3072
28};
29
32DECLARE_ENUM_OPERATORS(System::Net::SecurityProtocolType);
34DECLARE_USING_GLOBAL_OPERATORS
36
37class ICertificatePolicy;
38
43class ASPOSECPP_SHARED_CLASS ServicePointManager : public System::Object
44{
49
51 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
53 ASPOSECPP_SHARED_RTTI_INFO_DECL();
54
55public:
57 static ASPOSECPP_SHARED_API const int32_t DefaultNonPersistentConnectionLimit;
59 static ASPOSECPP_SHARED_API const int32_t DefaultPersistentConnectionLimit;
60
65 static ASPOSECPP_SHARED_API SecurityProtocolType get_SecurityProtocol();
69 static ASPOSECPP_SHARED_API void set_SecurityProtocol(SecurityProtocolType value);
72 static ASPOSECPP_SHARED_API int32_t get_MaxServicePoints();
75 static ASPOSECPP_SHARED_API void set_MaxServicePoints(int32_t value);
78 static ASPOSECPP_SHARED_API int32_t get_DefaultConnectionLimit();
81 static ASPOSECPP_SHARED_API void set_DefaultConnectionLimit(int32_t value);
84 static ASPOSECPP_SHARED_API int32_t get_MaxServicePointIdleTime();
87 static ASPOSECPP_SHARED_API void set_MaxServicePointIdleTime(int32_t value);
90 static ASPOSECPP_SHARED_API bool get_UseNagleAlgorithm();
93 static ASPOSECPP_SHARED_API void set_UseNagleAlgorithm(bool value);
96 static ASPOSECPP_SHARED_API bool get_Expect100Continue();
99 static ASPOSECPP_SHARED_API void set_Expect100Continue(bool value);
102 static ASPOSECPP_SHARED_API bool get_EnableDnsRoundRobin();
105 static ASPOSECPP_SHARED_API void set_EnableDnsRoundRobin(bool value);
108 static ASPOSECPP_SHARED_API int32_t get_DnsRefreshTimeout();
111 static ASPOSECPP_SHARED_API void set_DnsRefreshTimeout(int32_t value);
117 static ASPOSECPP_SHARED_API void set_CertificatePolicy(System::SharedPtr<ICertificatePolicy> value);
123 static ASPOSECPP_SHARED_API void
127 static ASPOSECPP_SHARED_API bool get_ReusePort();
130 static ASPOSECPP_SHARED_API void set_ReusePort(bool value);
135 static ASPOSECPP_SHARED_API bool get_CheckCertificateRevocationList();
139 static ASPOSECPP_SHARED_API void set_CheckCertificateRevocationList(bool value);
143
148 static ASPOSECPP_SHARED_API void SetTcpKeepAlive(bool enabled, int32_t keepAliveTime, int32_t keepAliveInterval);
149
150private:
152 static ASPOSECPP_SHARED_API Security::RemoteCertificateValidationCallback s_ServerCertValidationCallback;
153};
154}} // namespace System::Net
155
156DECLARE_USING_ENUM_OPERATORS(System::Net);
Manages the lifecycle stages (creating, maintaining, and deleting) of the ServicePoint class instance...
Definition: service_point_manager.h:44
static void set_CertificatePolicy(System::SharedPtr< ICertificatePolicy > value)
Sets a certificate policy.
static void SetTcpKeepAlive(bool enabled, int32_t keepAliveTime, int32_t keepAliveInterval)
Sets the value that indicates if the 'Keep-Alive' option is enabled.
static SecurityProtocolType get_SecurityProtocol()
Gets the security protocol type used by the ServicePoint-class instances that are managed by the curr...
static int32_t get_DnsRefreshTimeout()
Gets a timeout in milliseconds during which a DNS resolution is considered valid.
static bool get_CheckCertificateRevocationList()
Gets a value that indicates if the certificate must be checked against the certificate authority revo...
static bool get_EnableDnsRoundRobin()
Gets a value that indicates if a DNS resolution rotates among the applicable IP addresses.
static int32_t get_DefaultConnectionLimit()
Gets the maximum number of concurrent connections that are allowed by the ServicePoint-class instance...
static System::Net::Security::EncryptionPolicy get_EncryptionPolicy()
Returns the encryption policy that is used by the current instance.
static void set_ServerCertificateValidationCallback(Security::RemoteCertificateValidationCallback value)
Sets the callback that is used to validate a server certificate.
static void set_EnableDnsRoundRobin(bool value)
Sets a value that indicates if a DNS resolution rotates among the applicable IP addresses.
static const int32_t DefaultNonPersistentConnectionLimit
The default number of non-persistent connections.
Definition: service_point_manager.h:57
static void set_UseNagleAlgorithm(bool value)
Sets a value that indicates if the ServicePoint-class instances use the Nagle algorithm.
static bool get_UseNagleAlgorithm()
Gets a value that indicates if the ServicePoint-class instances use the Nagle algorithm.
static void set_MaxServicePointIdleTime(int32_t value)
Sets the maximum idle time of the ServicePoint-class instances.
static void set_DnsRefreshTimeout(int32_t value)
Sets a timeout in milliseconds during which a DNS resolution is considered valid.
static const int32_t DefaultPersistentConnectionLimit
The default number of persistent connections.
Definition: service_point_manager.h:59
static bool get_Expect100Continue()
Gets a value that indicates if the ServicePoint-class instances use the 100-Continue behavior.
static void set_DefaultConnectionLimit(int32_t value)
Sets the maximum number of concurrent connections that are allowed by the ServicePoint-class instance...
static bool get_ReusePort()
Gets a value that indicates if the output connections sockets use the 'SO_REUSE_UNICASTPORT' option.
static Security::RemoteCertificateValidationCallback get_ServerCertificateValidationCallback()
Gets the callback that is used to validate a server certificate.
static void set_Expect100Continue(bool value)
Sets a value that indicates if the ServicePoint-class instances use the 100-Continue behavior.
static int32_t get_MaxServicePoints()
Gets the maximum number of the ServicePoint-class instances that can be managed by the current instan...
static void set_SecurityProtocol(SecurityProtocolType value)
Sets the security protocol type used by the ServicePoint-class instances that are managed by the curr...
static void set_CheckCertificateRevocationList(bool value)
Sets a value that indicates if the certificate must be checked against the certificate authority revo...
static void set_MaxServicePoints(int32_t value)
Sets the maximum number of the ServicePoint-class instances that can be managed by the current instan...
static System::SharedPtr< ICertificatePolicy > get_CertificatePolicy()
Gets a certificate policy.
static int32_t get_MaxServicePointIdleTime()
Gets the maximum idle time of the ServicePoint-class instances.
static void set_ReusePort(bool value)
Sets a value that indicates if the output connections sockets use the 'SO_REUSE_UNICASTPORT' option.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
System::MulticastDelegate< bool(System::SharedPtr< Object >, System::SharedPtr< System::Security::Cryptography::X509Certificates::X509Certificate >, System::SharedPtr< System::Security::Cryptography::X509Certificates::X509Chain >, SslPolicyErrors)> RemoteCertificateValidationCallback
A user delegate used to verify remote SSL certificate.
Definition: ssl_stream.h:43
EncryptionPolicy
Enumerates the encryption policies.
Definition: ssl_stream.h:31
Definition: authentication_schemes.h:9
SecurityProtocolType
Enumerates the security protocol types.
Definition: service_point_manager.h:17
Definition: db_command.h:9