开发者

How to read from Named Pipe latest data for a while and save that data to disc using C#?

开发者 https://www.devze.com 2023-01-06 09:44 出处:网络
So I have some server broadcasting live data onto Named Pipe -\\\\.\\pipe\\TestChannel (from VLC for example). I want to read it from now some N seconds and save that readen data to some.file. How to

So I have some server broadcasting live data onto Named Pipe - \\.\pipe\TestChannel (from VLC for example). I want to read it from now some N seconds and save that readen data to some.file. How to do such thing using C# .Net3.5? (and BTW I wonder about if it is easier to do it from .net4) Could you please provide开发者_运维知识库 some simple code example?


You can use a NamedPipeClientStream to open the pipe, and read in your data. Just read in the data using standard Stream functions (just like a file), and reroute to the other file as needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消