You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by mm...@apache.org on 2020/08/05 18:10:11 UTC
[geode-native] 05/07: Add the new SetSniProxy API
This is an automated email from the ASF dual-hosted git repository.
mmartell pushed a commit to branch GEODE-8398-sni-support-dotnet
in repository https://gitbox.apache.org/repos/asf/geode-native.git
commit 0cea826488bf41544f9f0abc8ecefcd3a43c8181
Author: Mike Martell <mm...@pivotal.io>
AuthorDate: Tue Aug 4 14:59:08 2020 -0700
Add the new SetSniProxy API
---
clicache/src/PoolFactory.cpp | 16 ++++++++++++++++
clicache/src/PoolFactory.hpp | 14 ++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/clicache/src/PoolFactory.cpp b/clicache/src/PoolFactory.cpp
index c72da35..9c62562 100644
--- a/clicache/src/PoolFactory.cpp
+++ b/clicache/src/PoolFactory.cpp
@@ -285,6 +285,22 @@ namespace Apache
return this;
}
+ PoolFactory^ PoolFactory::SetSniProxy(String^ hostname, Int32 port)
+ {
+ _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+ try
+ {
+ m_nativeptr->get()->setSniProxy( marshal_as<std::string>(hostname), port );
+ }
+ finally
+ {
+ GC::KeepAlive(m_nativeptr);
+ }
+
+ _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+ return this;
+ }
PoolFactory^ PoolFactory::SetSubscriptionEnabled( Boolean enabled )
{
diff --git a/clicache/src/PoolFactory.hpp b/clicache/src/PoolFactory.hpp
index e6f703e..7d0e3c3 100644
--- a/clicache/src/PoolFactory.hpp
+++ b/clicache/src/PoolFactory.hpp
@@ -280,6 +280,20 @@ namespace Apache
PoolFactory^ AddServer(String^ host, Int32 port);
/// <summary>
+ /// Set proxy info for SNI connection.
+ /// </summary>
+ /// <remarks>
+ /// Used for connecting via SNI proxy.
+ /// </remarks>
+ /// <param>
+ /// host the host name or ip address that the server is listening on.
+ /// </param>
+ /// <param>
+ /// port the port that the server is listening on.
+ /// </param>
+ PoolFactory^ SetSniProxy(String^ hostname, Int32 port);
+
+ /// <summary>
/// Enable subscriptions.
/// </summary>
/// <remarks>