diff options
author | 2015-03-03 09:30:55 -0800 | |
---|---|---|
committer | 2015-03-09 16:05:05 -0700 | |
commit | b0829ebaf174216787c9a9557cf4a40afa2c8023 (patch) | |
tree | f392cff9c5341a9e765aec6a161c8d4025a7dff5 /src/csharp/Grpc.Core/Server.cs | |
parent | 874e53ad2d61ae3846a4a9672eb871cc51bb0c84 (diff) |
C# server side TLS support
Diffstat (limited to 'src/csharp/Grpc.Core/Server.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Server.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 152cc2176c..cafdb3b663 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -75,10 +75,20 @@ namespace Grpc.Core } // only call before Start() - public int AddPort(string addr) { + public int AddPort(string addr) + { return handle.AddPort(addr); } + // only call before Start() + public int AddPort(string addr, ServerCredentials credentials) + { + using (var nativeCredentials = credentials.ToNativeCredentials()) + { + return handle.AddPort(addr, nativeCredentials); + } + } + public void Start() { handle.Start(); |