Exemple #1
0
        //*/

        public ChannelReader <int> DuplexTwoChannel(ChannelReader <int> requestChannel)
        {
            var responseChannel = Channel.CreateUnbounded <int>();

            AsyncStream.EnumerateBackChannel(requestChannel, responseChannel.Writer, _logger);

            return(responseChannel.Reader);
        }
Exemple #2
0
        public async Task <ChannelReader <int> > DuplexOneChannel(ChannelReader <int> requestChannel)
        {
            var responseChannel = Channel.CreateUnbounded <int>();

            _ = AsyncStream.EnumerateBackChannel(requestChannel, responseChannel.Writer, _logger);

            return(await _appTwoClient.StreamDuplexTwoChannel(responseChannel.Reader));
        }