NamedPipes | A pattern for client/server communication via Named Pipes | Runtime Evironment library

 by   malcomvetter C# Version: Current License: No License

kandi X-RAY | NamedPipes Summary

kandi X-RAY | NamedPipes Summary

NamedPipes is a C# library typically used in Server, Runtime Evironment, Nodejs applications. NamedPipes has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

A pattern for client/server communication via Named Pipes via C#
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              NamedPipes has a low active ecosystem.
              It has 71 star(s) with 18 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              NamedPipes has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of NamedPipes is current.

            kandi-Quality Quality

              NamedPipes has no bugs reported.

            kandi-Security Security

              NamedPipes has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              NamedPipes does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              NamedPipes releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NamedPipes
            Get all kandi verified functions for this library.

            NamedPipes Key Features

            No Key Features are available at this moment for NamedPipes.

            NamedPipes Examples and Code Snippets

            No Code Snippets are available at this moment for NamedPipes.

            Community Discussions

            QUESTION

            inter-process communication between linux and dotnet using mkfifo
            Asked 2020-Oct-20 at 15:53

            We have an application written in c that sends events/notifications to an application written in c#. Both applications run on the same linux computer.

            The C application:

            The C application is Asterisk and we modified the source code (it is open source) so that it can send events to our dotnet console application. The way we currently send events is simply by appending text to a file. For example this is how we send an event that a new peer (ip-phone) connected:

            ...

            ANSWER

            Answered 2020-Oct-17 at 02:13

            I would use an AF_UNIX socket connection.

            Source https://stackoverflow.com/questions/64398382

            QUESTION

            An efficient way to use Windows Named Pipe for IPC
            Asked 2020-Jul-26 at 08:38

            I am using jna module to connect two processes that both perform FFMPEG commands. Send SDTOUT of FFMPEG command on the server side to NampedPipe and receive STDIN from that NampedPipe for other FFMPEG command on the Client side.

            this is how I capture STDOUT and send into the pipe in server Side:

            ...

            ANSWER

            Answered 2020-Jul-26 at 08:38

            Seems like you're constantly polling process states stdin on server side without waiting for any events or sleeping the thread. Probably you want to take a look here: Concurrent read/write of named pipe in Java (on windows)

            Cheers!

            Source https://stackoverflow.com/questions/63097736

            QUESTION

            Where should I cleanup private resources for a ServiceHost?
            Asked 2020-Apr-30 at 07:13

            I've set up a WCF NamedPipes Server/Client pair of applications but when the Host stops and calls ServiceHost.Close() it doesn't seem to appropriately cleanup the object from which the Host was created (using an object rather than a type to instantiate the host).

            The server application code is as follows:

            ...

            ANSWER

            Answered 2020-Apr-30 at 07:13

            Your output is a ServiceHost which is not a custom type you create. Therefore it will not automatically call IMyServer.Dispose().

            Instead of returning a ServiceHost, create some kind of adapter that will manage the ServiceHost and your IMyServer instance and return it to the void Main() method.

            Then, simply add a finally clause (or implement IDisposable and use using) and call your adapter's dispose, that will call serviceHost.Dispose() and myServer.Dispose().

            Source https://stackoverflow.com/questions/61517587

            QUESTION

            Using App Service between Side-loaded UWP and Console App without App packaging project
            Asked 2020-Mar-04 at 00:30

            I have an Enterprise LOB scenario, where I need to communicate between my Sideloaded UWP app and multiple console applications which are developed by third parties. Internally, these console apps will be interfacing with COM ports and hardware devices.

            Can I use App Service to communicate between UWP and out-of-package Console App?

            Further more, the communication must be two way and asynchronous, expected flow:

            1. UWP -start-console-app-expect-no-response-> Console App (How to achieve this step without desktop-bridge?)
            2. UWP <-send-data-expect-no-response- Console App
            3. UWP -send-data-expect-no-response-> Console App

            I have already referred the links below but according to them "Windows Application Packaging Project" is a must.

            Please do suggest if there are any other alternatives too.

            EDIT:

            It is possible to start out-of-package Console Apps from UWP using 2 methods:

            1. Create a package with a Console App which can launch any other Console app(s). Refer: https://stackoverflow.com/a/49340814/10224384
            2. Launch Console App via protocol URI. Create a URI protocol to Console App: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914%28v%3dvs.85%29 OR https://www.meziantou.net/registering-an-application-to-a-uri-scheme-using-net.htm

            However, it is not possible to communicate between the out-of-package Console App and the UWP via the App Service. Even though, the Console app has reference to Microsoft.Windows.SDK.Contracts nuget package and can access AppServiceConnection API since AppServiceConnection class has the DualApiPartitionAttribute. The connection cannot be established with the AppServiceUnavailable Error.

            Hence, Now I'm trying a new solution with option 1 from above as mentioned here: https://docs.microsoft.com/answers/questions/1166/how-uwp-can-communicate-with-windows-service.html?childToView=1211#answer-1211

            Fallback options that need investigation:

            • WCF Http/NamedPipes
            • UWP starts Console App, Console App responds by invoking a Launch by URI protocol (Of course the UWP needs to register the Protocol)
            ...

            ANSWER

            Answered 2020-Mar-04 at 00:30

            AppServiceConnection cannot be used to establish communication between out-of-package Console App and UWP, see the updated question.

            From comments, I think this can be achievable, but it should not be through the COM port, but to establish AppServiceConnection.

            Please refer to this document to create AppService for UWP applications. If your console app can create an AppServiceConnection, then you can establish a connection with the UWP app and transfer data.

            AppServiceConnection is a two-way communication. After the connection is established, the console app and UWP app can send information to each other.

            Source https://stackoverflow.com/questions/60189518

            QUESTION

            How to run NamedPipe stream under parforloop in MatLab Appdesigner
            Asked 2019-Jul-22 at 09:25

            I am developing a software in matlab appdesigner that will run two functions simultaneously under parforloop. The first function has a NamedPipe object and the error is: Functionality not supported with figures created with the uifigure function for the app variable and also unable to load .Net object . What's the problem with NamedPipe object under parforloop? How can i run namedpipe communication with parallelism in matlab appdesigner? Here is my code

            ...

            ANSWER

            Answered 2019-Jul-22 at 09:25

            Finally, I have found the solution. So i am posting the answer for future help. parallel.pool.DataQueue should be used here. Here is the full code of appdesigner. For Full Server and Client code you can also check this github repository: Named Pipe Parallel Communication

            Source https://stackoverflow.com/questions/57021391

            QUESTION

            Visual Studio Thread Statement gives Error?
            Asked 2019-Mar-04 at 19:25

            I decompiled a .NET Application to write my own Injection Software. A Thread Error don't want to get removed. I tried everything but it keeps telling me that something is wrong...

            Code (Screenshot)

            ...

            ANSWER

            Answered 2019-Mar-04 at 19:25

            I think you are getting the The call is ambiguous between the following methods or properties: 'Thread.Thread(ThreadStart)' and 'Thread.Thread(ParameterizedThreadStart)' error with this.

            As you correctly noted, the compiler can't distinguish what type the Thread constructor parameter is. ParameterizedThreadStart is used if you pass a parameter to your delegate when calling the Thread.Start method. Your code does not do this. Thus, you need a ThreadStart delegate here. Its syntax is

            Source https://stackoverflow.com/questions/54989261

            QUESTION

            Named Pipe Communication between Node.js and .net
            Asked 2018-Apr-03 at 12:55

            I am working on an inter-process communication between a .net (v4.5.2) and Javascript node.js (v8.9.0) application. I want to use Windows named pipes for this (and only named pipes). For the Javascript application, I am using the named-pipes package (v0.0.1) I am able to establish a connection between the two applications which tells me that I am not completely off base here. I would expect to see the data event being triggered in the JavaScript application whenever I am writing a string to the NamedPipeServerStream but no data is received. I can not receive any data. Here is the code for .net and the JavaScript application. Any ideas, why that the data event is not triggered?

            .Net Code

            ...

            ANSWER

            Answered 2018-Apr-03 at 12:55

            There are two reasons, why the data event is not triggered:

            1. The "named-pipes" package is internally creating sub-pipes. This package is easy to use, if you create the server with the same package. But in this case the pipe server is created via a .net application. So in the javascript code you better use the "net" module of Node.js to connect to the server.

            2. In the .net application you should not create a new StreamWriter. Just use the write method of the server instance. The NamedPipeServerStream implements IDisposable, so it is better to put it in a using block.

            .Net Code

            Source https://stackoverflow.com/questions/47231534

            QUESTION

            C# NamedPipe over network throws UnauthorizedAccessException on client connect
            Asked 2018-Jan-20 at 00:05

            I have a client and a NamedPipe server. The client and the server run on distinct Windows services. On the same machine the connection works perfectly. But when attempting to access the server from another machine, an exception of type UnauthorizedAccessException is thrown (access is denied). I researched several posts and included AccessRules on the server, but it did not work. The client machine user does not exist on the server machine. Is there a specific / AccessRule setting for this case? Does anyone know the solution?

            Server:

            ...

            ANSWER

            Answered 2018-Jan-20 at 00:05

            I don't know why this question was downvoted - I corrected that.

            I tested this in my lab on two Win 7 machines with different users.

            The remote named pipes in Windows are over SMB / CIFS. So normal logon restrictions apply.

            I was able to get this to run successfully if I changed in the local security policy:

            Security Options

            Accounts: Guest account status – change to Enabled

            User Rights Assignment

            Deny access to this computer from the network - remove "Guest"

            Warning

            This is not a good idea to do this. I only did the changes to verify this and changed them back immediately.

            There is also an option in the local security policy for adding named pipes which can be accessed anonymously, but this didn't work in my case. One had to investigate into this.

            In my opinion, using named pipes for un-authenticated access is not the best solution. Normally, I prefer authenticated connections, but in my case most of my development is in an corporate intranet with all machines in an Active Directory environment with AD users, so this is easy.

            Perhaps you can use the old trick of using the same user name with the same password on both machines, this will work without the above mentioned policy changes.

            Source https://stackoverflow.com/questions/48325820

            QUESTION

            ReadFile using NamedPipe blocks though using overlapped
            Asked 2017-Aug-15 at 12:55

            I am using NamedPipes to communicate between different modules of our windows application. At one point it is possible that a read operation could take long time so we would like to add a timeout. I added the OVERLAPPED-flag like this:

            ...

            ANSWER

            Answered 2017-Aug-15 at 12:55

            In your code, the FILE_FLAG_OVERLAPPED is in the dwDesiredAccess parameter, but it should be specified in the dwFlagsAndAttributes parameter.

            So, this might work better:

            Source https://stackoverflow.com/questions/45693227

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install NamedPipes

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/malcomvetter/NamedPipes.git

          • CLI

            gh repo clone malcomvetter/NamedPipes

          • sshUrl

            git@github.com:malcomvetter/NamedPipes.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link