开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜