Stream duplication

I have a producer who provides an instance of System.IO.Stream. I also have several clients that consume this thread.

Is it possible to provide each client with a "private view" of the stream? For example, if clientA reads from the stream, this does not affect the position that the client bank sees (that is, if clientB starts reading from the stream, it receives the beginning, and not from where clientA left the position). If that matters, clients only read from the stream.

Hope this makes sense.

Thanks in advance, Mike

+3
source share
3 answers

, "TssStream", .

, Stream, , , (, ) .

+2

Stream, . , .

+1

You can do this by reading a stream, caching data and opening new streams in the cache for each client.

0
source

Source: https://habr.com/ru/post/1707616/


All Articles