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
 static extern CallSafeHandle grpcsharp_batch_context_server_rpc_new_call(BatchContextSafeHandle ctx);
예제 #5
0
 static extern IntPtr grpcsharp_batch_context_server_rpc_new_host(BatchContextSafeHandle ctx);  // returns const char*
예제 #6
0
 GRPCCallError IPlatformInvocation.grpcsharp_server_request_call(ServerSafeHandle server,
     CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     return grpcsharp_server_request_call(server, cq, ctx);
 }
예제 #7
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)
 {
     return grpcsharp_batch_context_recv_initial_metadata(ctx);
 }
예제 #8
0
 static extern StatusCode grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx);
예제 #9
0
 static extern IntPtr grpcsharp_batch_context_server_rpc_new_host(BatchContextSafeHandle ctx);  // returns const char*
예제 #10
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_recv_initial_metadata(ctx));
 }
예제 #11
0
 static extern IntPtr grpcsharp_batch_context_recv_initial_metadata(BatchContextSafeHandle ctx);
예제 #12
0
 static extern IntPtr grpcsharp_batch_context_server_rpc_new_request_metadata(BatchContextSafeHandle ctx);
예제 #13
0
 static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
예제 #14
0
 void IPlatformInvocation.grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server,
                                                                        CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     grpcsharp_server_shutdown_and_notify_callback(server, cq, ctx);
 }
예제 #15
0
 static extern Timespec grpcsharp_batch_context_server_rpc_new_deadline(BatchContextSafeHandle ctx);
예제 #16
0
 GRPCCallError IPlatformInvocation.grpcsharp_server_request_call(ServerSafeHandle server,
                                                                 CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     return(grpcsharp_server_request_call(server, cq, ctx));
 }
예제 #17
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_recv_message(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_recv_message(call, ctx);
 }
예제 #18
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_recv_message_length(ctx));
 }
예제 #19
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_start_serverside(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_start_serverside(call, ctx);
 }
예제 #20
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);
 }
예제 #21
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);
 }
예제 #22
0
        public void RegisterBatchCompletion(BatchContextSafeHandle ctx, BatchCompletionDelegate callback)
        {
            OpCompletionDelegate opCallback = ((success) => HandleBatchCompletion(success, ctx, callback));

            Register(ctx.Handle, opCallback);
        }
예제 #23
0
 static extern IntPtr grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx);
예제 #24
0
 StatusCode IPlatformInvocation.grpcsharp_batch_context_recv_status_on_client_status(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_recv_status_on_client_status(ctx));
 }
예제 #25
0
 static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
예제 #26
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx) // returns const char*
 {
     return(grpcsharp_batch_context_recv_status_on_client_details(ctx));
 }
예제 #27
0
 static extern IntPtr grpcsharp_batch_context_server_rpc_new_request_metadata(BatchContextSafeHandle ctx);
예제 #28
0
 static extern GRPCCallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
예제 #29
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);
 }
예제 #30
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_send_close_from_client(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_send_close_from_client(call, ctx);
 }
예제 #31
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_status_on_client_trailing_metadata(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_recv_status_on_client_trailing_metadata(ctx));
 }
예제 #32
0
 static extern void grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
예제 #33
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);
 }
예제 #34
0
 CallSafeHandle IPlatformInvocation.grpcsharp_batch_context_server_rpc_new_call(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_server_rpc_new_call(ctx));
 }
예제 #35
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);
 }
예제 #36
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_server_rpc_new_host(BatchContextSafeHandle ctx) // returns const char*
 {
     return(grpcsharp_batch_context_server_rpc_new_host(ctx));
 }
예제 #37
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_recv_initial_metadata(CallSafeHandle call,
     BatchContextSafeHandle ctx)
 {
     return grpcsharp_call_recv_initial_metadata(call, ctx);
 }
예제 #38
0
 Timespec IPlatformInvocation.grpcsharp_batch_context_server_rpc_new_deadline(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_server_rpc_new_deadline(ctx));
 }
예제 #39
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_send_initial_metadata(CallSafeHandle call,
     BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray)
 {
     return grpcsharp_call_send_initial_metadata(call, ctx, metadataArray);
 }
예제 #40
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_server_rpc_new_request_metadata(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_server_rpc_new_request_metadata(ctx));
 }
예제 #41
0
 static extern IntPtr grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx);
예제 #42
0
 int IPlatformInvocation.grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx)
 {
     return(grpcsharp_batch_context_recv_close_on_server_cancelled(ctx));
 }
예제 #43
0
 static extern void grpcsharp_batch_context_recv_message_to_buffer(BatchContextSafeHandle ctx, byte[] buffer, UIntPtr bufferLen);
예제 #44
0
 static extern GRPCCallError grpcsharp_call_start_server_streaming(CallSafeHandle call,
                                                                   BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len,
                                                                   MetadataArraySafeHandle metadataArray, WriteFlags writeFlags);
예제 #45
0
 static extern IntPtr grpcsharp_batch_context_recv_status_on_client_details(BatchContextSafeHandle ctx);  // returns const char*
예제 #46
0
 static extern GRPCCallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call,
                                                                   BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
예제 #47
0
 static extern CallSafeHandle grpcsharp_batch_context_server_rpc_new_call(BatchContextSafeHandle ctx);
예제 #48
0
 static extern GRPCCallError grpcsharp_call_send_message(CallSafeHandle call,
                                                         BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, WriteFlags writeFlags, bool sendEmptyInitialMetadata);
예제 #49
0
 static extern GRPCCallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
예제 #50
0
 static extern GRPCCallError grpcsharp_call_send_close_from_client(CallSafeHandle call,
                                                                   BatchContextSafeHandle ctx);
예제 #51
0
 static extern Timespec grpcsharp_batch_context_server_rpc_new_deadline(BatchContextSafeHandle ctx);
예제 #52
0
 static extern GRPCCallError grpcsharp_call_send_status_from_server(CallSafeHandle call,
                                                                    BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata);
예제 #53
0
 void IPlatformInvocation.grpcsharp_server_shutdown_and_notify_callback(ServerSafeHandle server,
     CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx)
 {
     grpcsharp_server_shutdown_and_notify_callback(server, cq, ctx);
 }
예제 #54
0
 static extern GRPCCallError grpcsharp_call_recv_message(CallSafeHandle call,
                                                         BatchContextSafeHandle ctx);
예제 #55
0
 static extern int grpcsharp_batch_context_recv_close_on_server_cancelled(BatchContextSafeHandle ctx);
예제 #56
0
 static extern GRPCCallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call,
                                                                  BatchContextSafeHandle ctx);
예제 #57
0
 IntPtr IPlatformInvocation.grpcsharp_batch_context_recv_message_length(BatchContextSafeHandle ctx)
 {
     return grpcsharp_batch_context_recv_message_length(ctx);
 }
예제 #58
0
 static extern GRPCCallError grpcsharp_call_start_serverside(CallSafeHandle call,
                                                             BatchContextSafeHandle ctx);
예제 #59
0
 static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState,
     Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx);
예제 #60
0
 static extern GRPCCallError grpcsharp_call_send_initial_metadata(CallSafeHandle call,
                                                                  BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);