diff options
author | Craig Tiller <ctiller@google.com> | 2015-08-21 16:06:30 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-08-21 16:06:30 -0700 |
commit | b7e22b96865f24b70cbd9ddd96b6882e2b3df771 (patch) | |
tree | 6325a91ed40407a6f447280b9b58dd3b6ae9d9dd /src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs | |
parent | 849c7ca4b2bbda14dd9531ede3aa31cd86aa8d85 (diff) | |
parent | b7e55a20023b32177cb9b09e8ef0dc0d3cd0aa85 (diff) |
Merge github.com:grpc/grpc into y12kdm3
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs b/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs index 6a2add54db..3a96414bea 100644 --- a/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/BatchContextSafeHandle.cs @@ -134,7 +134,7 @@ namespace Grpc.Core.Internal } // Gets data of server_rpc_new completion. - public ServerRpcNew GetServerRpcNew() + public ServerRpcNew GetServerRpcNew(Server server) { var call = grpcsharp_batch_context_server_rpc_new_call(this); @@ -145,7 +145,7 @@ namespace Grpc.Core.Internal IntPtr metadataArrayPtr = grpcsharp_batch_context_server_rpc_new_request_metadata(this); var metadata = MetadataArraySafeHandle.ReadMetadataFromPtrUnsafe(metadataArrayPtr); - return new ServerRpcNew(call, method, host, deadline, metadata); + return new ServerRpcNew(server, call, method, host, deadline, metadata); } // Gets data of receive_close_on_server completion. @@ -198,14 +198,16 @@ namespace Grpc.Core.Internal /// </summary> internal struct ServerRpcNew { + readonly Server server; readonly CallSafeHandle call; readonly string method; readonly string host; readonly Timespec deadline; readonly Metadata requestMetadata; - public ServerRpcNew(CallSafeHandle call, string method, string host, Timespec deadline, Metadata requestMetadata) + public ServerRpcNew(Server server, CallSafeHandle call, string method, string host, Timespec deadline, Metadata requestMetadata) { + this.server = server; this.call = call; this.method = method; this.host = host; @@ -213,6 +215,14 @@ namespace Grpc.Core.Internal this.requestMetadata = requestMetadata; } + public Server Server + { + get + { + return this.server; + } + } + public CallSafeHandle Call { get |