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);