Skip to content

Named Pipe is not created – Listener example missing in documentation #82

@TorbenHammes

Description

@TorbenHammes

I am experiencing an issue when using named pipes with the interprocess library. In my code, I define the pipe as follows:

const PIPE_NAME: &str = r"\\.\pipe\netcommander_pipe";

let listener = PipeListenerOptions::new()
    .path(PIPE_NAME)
    .create::<pipe_mode::Bytes, pipe_mode::Bytes>()
    .expect("Failed to create the named pipe");

However, when starting the service, I receive the error:
Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }

Problem
I suspect that the error might be related to permission issues or timing problems during the initialization of the pipe. I have limited experience with named pipes, so I haven’t found much useful information on this topic. Additionally, I noticed that the example for the listener in the interprocess documentation is currently empty and is only planned for version 2.3.

Questions / Expected Assistance

  • Are there any known limitations or common issues when creating named pipes in a Windows service context?
  • How can I ensure that the pipe server is fully initialized before clients attempt to connect?
  • Are there any workarounds or alternative libraries that provide better support for this scenario?
  • Could adjusting security attributes or running the service with elevated privileges resolve this issue?

I appreciate any guidance or solutions, as I am currently stuck due to my limited experience with named pipes.

Thank you in advance!

Best regards,
Torben

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions