Exemplo n.º 1
0
        public void RegisterRequestCallCompletion(RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback)
        {
            // TODO(jtattermusch): get rid of new delegate creation here
            OpCompletionDelegate opCallback = ((success) => HandleRequestCallCompletion(success, ctx, callback));

            Register(ctx.Handle, opCallback);
        }
Exemplo n.º 2
0
 private static void HandleRequestCallCompletion(bool success, RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback)
 {
     try
     {
         callback(success, ctx);
     }
     catch (Exception e)
     {
         Logger.Error(e, "Exception occured while invoking request call completion delegate.");
     }
     finally
     {
         if (ctx != null)
         {
             ctx.Dispose();
         }
     }
 }
Exemplo n.º 3
0
 public void RegisterRequestCallCompletion(RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback)
 {
     ctx.CompletionCallback = callback;
     Register(ctx.Handle, ctx);
 }
Exemplo n.º 4
0
        public void RegisterRequestCallCompletion(RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback)
        {
            OpCompletionDelegate opCallback = ((success) => HandleRequestCallCompletion(success, ctx, callback));

            Register(ctx.Handle, opCallback);
        }
Exemplo n.º 5
0
 internal static extern IntPtr grpcsharp_request_call_context_request_metadata(RequestCallContextSafeHandle ctx);
Exemplo n.º 6
0
 internal static extern IntPtr grpcsharp_request_call_context_host(RequestCallContextSafeHandle ctx, out UIntPtr hostLength);
Exemplo n.º 7
0
 internal static extern Timespec grpcsharp_request_call_context_deadline(RequestCallContextSafeHandle ctx);
Exemplo n.º 8
0
 internal static extern IntPtr grpcsharp_request_call_context_method(RequestCallContextSafeHandle ctx, out UIntPtr methodLength);
Exemplo n.º 9
0
 internal static extern CallSafeHandle grpcsharp_request_call_context_call(RequestCallContextSafeHandle handler);
Exemplo n.º 10
0
 internal static extern CallError grpcsharp_server_request_call(ServerSafeHandle server, CompletionQueueSafeHandle cq, RequestCallContextSafeHandle ctx);
Exemplo n.º 11
0
 public void RegisterRequestCallCompletion(RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback)
 {
     OpCompletionDelegate opCallback = ((success) => HandleRequestCallCompletion(success, ctx, callback));
     Register(ctx.Handle, opCallback);
 }
Exemplo n.º 12
0
 private static void HandleRequestCallCompletion(bool success, RequestCallContextSafeHandle ctx, RequestCallCompletionDelegate callback)
 {
     try
     {
         callback(success, ctx);
     }
     catch (Exception e)
     {
         Logger.Error(e, "Exception occured while invoking request call completion delegate.");
     }
     finally
     {
         if (ctx != null)
         {
             ctx.Dispose();
         }
     }
 }