Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PipeTransmissionMode.Message is not supported on macOS #24097

Closed
rianjs opened this issue Nov 9, 2017 · 6 comments
Closed

PipeTransmissionMode.Message is not supported on macOS #24097

rianjs opened this issue Nov 9, 2017 · 6 comments
Milestone

Comments

@rianjs
Copy link

rianjs commented Nov 9, 2017

Is it on the roadmap?

Exception has occurred: CLR/System.PlatformNotSupportedException
An unhandled exception of type 'System.PlatformNotSupportedException' occurred in System.IO.Pipes.dll: 'Message transmission mode is not supported on this platform.'
   at System.IO.Pipes.NamedPipeServerStream.Create(String pipeName, PipeDirection direction, Int32 maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, Int32 inBufferSize, Int32 outBufferSize, HandleInheritability inheritability)
   at System.IO.Pipes.NamedPipeServerStream..ctor(String pipeName, PipeDirection direction, Int32 maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, Int32 inBufferSize, Int32 outBufferSize, HandleInheritability inheritability)
   at SpellerCore.UniversalPipeServer..ctor(String pipeName, Guid serverId, Int32 maxNumberOfServerInstances, ILog logger)
   at SpellerCore.NamedPipeSpellerController.StartNamedPipeServer()
   at SpellerDaemon.ServiceLauncher.Main(String[] args) in /Users/rianjs/dev/...
@stephentoub
Copy link
Member

How would it be implemented?

@rianjs
Copy link
Author

rianjs commented Nov 10, 2017

Yeah, someone else has just pointed out that *nix systems don't have a concept of messages, which I didn't know. I guess my question now is why it's in Netstandard? Should it be?

@stephentoub
Copy link
Member

Should it be?

We try not to subset types, putting some of a type into the standard and some not, as for the not part there's then no way to use that functionality on platforms where it is implemented. In such cases we've generally opted to include it, try hard to make it work everywhere, and where we can't fall back to either partial implementations or throwing PlatformNotSupportedExceptions; you can then do platform detection to use the functionality on platforms where it's available and fall back to something else on those where it isn't. The analyzer described at https://blogs.msdn.microsoft.com/dotnet/2017/10/31/introducing-api-analyzer/ is also evolving to make it easier to help, though I don't believe it's functionality/data is up-to-date for this particular case.
cc: @terrajobst

@stephentoub
Copy link
Member

I don't know of a way to properly implement this on Unix. If you have suggestions or we discover a way, this can be re-opened. In the meantime, though, it's not actionable so I'm going to close it. Thanks.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ygoe
Copy link

ygoe commented Apr 28, 2020

How does that message thing work in Windows then? Can this be emulated on other platforms? If you're not doing it, then I'll have to do it. (Actually I'll need to do it anyway because I need it sooner than you release anything.) I'd just use a 32-bit length prefix and then push over as many bytes, then split into messages on the receiving end. Would that work?

@ygoe
Copy link

ygoe commented Jun 21, 2020

@stephentoub Didn't mention you in my last comment where I suggested an implementation. Inspired by the WebSocket message header.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@ygoe @stephentoub @rianjs @msftgits and others