diff options
author | 2015-02-21 17:51:52 -0800 | |
---|---|---|
committer | 2015-02-23 11:35:49 -0800 | |
commit | 50faa8f78b210a9922644f624d3c0a36b4e2a2db (patch) | |
tree | d726e42f02f400a67090c5e7e4d0354bdd9de738 /src/csharp/Grpc.Core/Internal/CallSafeHandle.cs | |
parent | 7c15ee88a2cde0fbb7d88a0a31ae772c6895efe9 (diff) |
Added support for true synchronous unary call and added some performance tests.
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/CallSafeHandle.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/CallSafeHandle.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index 659a383b4b..1c0bc98f06 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -63,6 +63,11 @@ namespace Grpc.Core.Internal byte[] send_buffer, UIntPtr send_buffer_len); [DllImport("grpc_csharp_ext.dll")] + static extern void grpcsharp_call_blocking_unary(CallSafeHandle call, CompletionQueueSafeHandle dedicatedCq, + [MarshalAs(UnmanagedType.FunctionPtr)] CompletionCallbackDelegate callback, + byte[] send_buffer, UIntPtr send_buffer_len); + + [DllImport("grpc_csharp_ext.dll")] static extern GRPCCallError grpcsharp_call_start_client_streaming(CallSafeHandle call, [MarshalAs(UnmanagedType.FunctionPtr)] CompletionCallbackDelegate callback); @@ -113,6 +118,11 @@ namespace Grpc.Core.Internal AssertCallOk(grpcsharp_call_start_unary(this, callback, payload, new UIntPtr((ulong) payload.Length))); } + public void BlockingUnary(CompletionQueueSafeHandle dedicatedCq, byte[] payload, CompletionCallbackDelegate callback) + { + grpcsharp_call_blocking_unary(this, dedicatedCq, callback, payload, new UIntPtr((ulong) payload.Length)); + } + public void StartClientStreaming(CompletionCallbackDelegate callback) { AssertCallOk(grpcsharp_call_start_client_streaming(this, callback)); |