【发布时间】:2022-01-21 11:36:36
【问题描述】:
我想在 Linux 中使用 .net6 创建一个命名管道(“mkfifo”)。
使用 NamedPipeServerStream 类对我没有帮助,因为它创建的是套接字文件而不是管道。
这会创建一个套接字:
var notAPipeButsocket = new NamedPipeServerStream("/tmp/my.notpipe", PipeDirection.Out, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
notAPipeButsocket.WaitForConnection();
微软似乎选择在 linux 中使用套接字显式实现“NamedPipeServerStream”:Why not use Unix Domain Sockets for Named Pipes?
如何在Linux中用.net6创建一个真正的命名管道文件并写入其中?
上下文:我想用 WireShark 打开管道。
【问题讨论】:
标签: c# .net-core pipe .net-6.0