예제 #1
0
 public void StartReceiveMessage(ReceivedMessageHandler callback)
 {
     using (completionQueue.NewScope())
     {
         var ctx = BatchContextSafeHandle.Create();
         completionRegistry.RegisterBatchCompletion(ctx, (success, context) => callback(success, context.GetReceivedMessage()));
         pinvoke.grpcsharp_call_recv_message(this, ctx).CheckOk();
     }
 }