在流上需要过程中的“管道”

时间:2019-06-07 09:17:50

标签: c# .net-core stream

我有以下代码:

public  override async Task<Empty> MirrorFull(IAsyncStreamReader<StringPayload> requestStream, ServerCallContext context)
        {

            MyQueueHandler fqh = new MyQueueHandler(...);
            while(await requestStream.MoveNext(CancellationToken.None))
            {
                logger.Debug($"**RECEIVE MIRROR MESSAGE FOR FULL**");
                //I've read a string from source stream reader, i need to push on the fqh stream...
            }
            return new Empty();
        }

所以我在一个gRPC服务器中,该服务器从gRPC接收字符串流。队列处理程序具有以下功能:

public override async Task  ConsumeAsync(Stream stream)

我想在ConsumeAsync中连续“管道”接收的字符串,因此我需要某种PipeStream,但是我没有找到它(显然,PipeStream类不是我所需要的)我该怎么做? >

0 个答案:

没有答案