I am looking into using named pipes to control some aspects of a .net core application running under linux (ex: triggering a save, shutdown, etc).
I am trying to create a NamedPipeServerStream
inside the application, however it always fails with the following message: Address already in use
(I tried different names, nothing helps).
I have also attempted creating a temporary pipe using /tmp/somepipename
, however this also fails with the following message: The name of a pipe on this platform must only include characters valid in file names.
From looking at the .NET Core tests for named pipes, this shouldn't be an issue as they also use Path.GetTemporaryFileName()
to generate a temporary pipe
Here is the usage: NamedPipeTestBase.cs
And here is the implementation of GetUniquePipeName
: PipeTestBase.cs
Just in case, here is the code I am using (one liner, pretty simple):
_pipe = new NamedPipeServerStream("somepipename", PipeDirection.InOut,1);
Am I doing something wrong, or are Named Pipes not fully implemented for Linux yet?