예제 #1
0
 public void StartSendMessage(SendCompletionHandler callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata)
 {
     using (completionQueue.NewScope())
     {
         var ctx = BatchContextSafeHandle.Create();
         completionRegistry.RegisterBatchCompletion(ctx, (success, context) => callback(success));
         pinvoke.grpcsharp_call_send_message(this, ctx, payload, new UIntPtr((ulong)payload.Length), writeFlags, sendEmptyInitialMetadata).CheckOk();
     }
 }