public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags)
 {
     using (Profilers.ForCurrentThread().NewScope("CallSafeHandle.StartUnary"))
     {
         Native.grpcsharp_call_start_unary(this, ctx, payload, new UIntPtr((ulong)payload.Length), metadataArray, writeFlags)
             .CheckOk();
     }
 }
Пример #2
0
 private static void HandleBatchCompletion(bool success, BatchContextSafeHandle ctx, BatchCompletionDelegate callback)
 {
     try
     {
         callback(success, ctx);
     }
     catch (Exception e)
     {
         Logger.Error(e, "Exception occured while invoking completion delegate.");
     }
     finally
     {
         if (ctx != null)
         {
             ctx.Dispose();
         }
     }
 }
Пример #3
0
 private static void HandleBatchCompletion(bool success, BatchContextSafeHandle ctx, BatchCompletionDelegate callback)
 {
     try
     {
         callback(success, ctx);
     }
     catch (Exception e)
     {
         Console.WriteLine("Exception occured while invoking completion delegate: " + e);
     }
     finally
     {
         if (ctx != null)
         {
             ctx.Dispose();
         }
     }
 }
Пример #4
0
 void IPlatformInvocation.grpcsharp_batch_context_recv_message_to_buffer(BatchContextSafeHandle ctx, byte[] buffer, UIntPtr bufferLen)
 {
     grpcsharp_batch_context_recv_message_to_buffer(ctx, buffer, bufferLen);
 }
Пример #5
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)
 {
     return grpcsharp_batch_context_recv_initial_metadata(ctx);
 }
Пример #6
0
 static extern IntPtr grpcsharp_batch_context_server_rpc_new_request_metadata(BatchContextSafeHandle ctx);
Пример #7
0
 GRPCCallError IPlatformInvocation.grpcsharp_server_request_call(ServerSafeHandle server,
     CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     return grpcsharp_server_request_call(server, cq, ctx);
 }
Пример #8
0
 static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
Пример #9
0
 static extern IntPtr grpcsharp_batch_context_server_rpc_new_host(BatchContextSafeHandle ctx);  // returns const char*
Пример #10
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_start_serverside(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_start_serverside(call, ctx);
 }
Пример #11
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_recv_initial_metadata(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_recv_initial_metadata(call, ctx);
 }
Пример #12
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_recv_message(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_recv_message(call, ctx);
 }
Пример #13
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_send_status_from_server(CallSafeHandle call,
     BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage,
     MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata)
 {
     return grpcsharp_call_send_status_from_server(call, ctx, statusCode, statusMessage, metadataArray,
         sendEmptyInitialMetadata);
 }
Пример #14
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_send_close_from_client(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_send_close_from_client(call, ctx);
 }
Пример #15
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_send_message(CallSafeHandle call,
     BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, WriteFlags writeFlags,
     bool sendEmptyInitialMetadata)
 {
     return grpcsharp_call_send_message(call, ctx, send_buffer, send_buffer_len, writeFlags,
         sendEmptyInitialMetadata);
 }
Пример #16
0
 static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
Пример #17
0
 static extern CallSafeHandle grpcsharp_batch_context_server_rpc_new_call(BatchContextSafeHandle ctx);
Пример #18
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_send_initial_metadata(CallSafeHandle call,
     BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)
 {
     return grpcsharp_call_send_initial_metadata(call, ctx, metadataArray);
 }
Пример #19
0
 static extern GRPCCallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
Пример #20
0
 static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
Пример #21
0
 static extern Timespec grpcsharp_batch_context_server_rpc_new_deadline(BatchContextSafeHandle ctx);
Пример #22
0
 static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
Пример #23
0
 void IPlatformInvocation.grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server,
     CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     grpcsharp_server_shutdown_and_notify_callback(server, cq, ctx);
 }
Пример #24
0
 void IPlatformInvocation.grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel,
     ChannelState lastObservedState, Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     grpcsharp_channel_watch_connectivity_state(channel, lastObservedState, deadline, cq, ctx);
 }
Пример #25
0
 static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
Пример #26
0
 static extern void grpcsharp_batch_context_recv_message_to_buffer(BatchContextSafeHandle ctx, byte[] buffer, UIntPtr bufferLen);
Пример #27
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)
 {
     return grpcsharp_batch_context_recv_message_length(ctx);
 }
Пример #28
0
 static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
Пример #29
0
 static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState,
     Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
Пример #30
0
 static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx);  // returns const char*