internal void SendBatch(Batch batch)
 {
     EmitBatchArgs.Send(
         this.SeqId,
         batch,
         this.OutputProtocol);
 }
 internal Task WriteBatchAsync(Batch batch, CancellationToken cancellationToken)
 {
     return(EmitBatchArgs.WriteAsync(
                this.SeqId,
                batch,
                this.OutputProtocol,
                cancellationToken));
 }
 internal Task WriteBatchAsync(byte[] processMessage, List <BufferWriterMemory> spanMessages, CancellationToken cancellationToken)
 {
     return(EmitBatchArgs.WriteAsync(
                this.SeqId,
                processMessage,
                spanMessages,
                this.OutputProtocol,
                cancellationToken));
 }
예제 #4
0
        internal async Task EmitBatchAsync(byte[] processMessage, IEnumerable <BufferWriterMemory> spanMessages, CancellationToken cancellationToken)
        {
            await this.OutputProtocol.WriteMessageBeginAsync(new TMessage("emitBatch", TMessageType.Oneway, this.SeqId), cancellationToken);

            await EmitBatchArgs.WriteAsync(processMessage, spanMessages, this.OutputProtocol, cancellationToken);

            await this.OutputProtocol.WriteMessageEndAsync(cancellationToken);

            await this.OutputProtocol.Transport.FlushAsync(cancellationToken);
        }
예제 #5
0
        public async Task EmitBatchAsync(Batch batch, CancellationToken cancellationToken)
        {
            await this.OutputProtocol.WriteMessageBeginAsync(new TMessage("emitBatch", TMessageType.Oneway, this.SeqId), cancellationToken);

            var args = new EmitBatchArgs();

            args.Batch = batch;

            await args.WriteAsync(this.OutputProtocol, cancellationToken);

            await this.OutputProtocol.WriteMessageEndAsync(cancellationToken);

            await this.OutputProtocol.Transport.FlushAsync(cancellationToken);
        }