11.13. Communicate Using Named Pipes

Problem

You need to send data between two processes on the same computer (or remote computers) using a named pipes connection.

Solution

One computer (the server) must create the server using the NamedPipeServerStream class and wait for connections clients using the WaitForConnection method. Another computer (the client) establishes a connection to the server pipe by creating an instance of the NamedPipeClientStream and using the Connect method.

How It Works

A pipe represents a line of communications between two processes, which may or may not be on the same machine. These pipes come in two main forms: anonymous and named. Anonymous pipes, represented by the AnonymousPipeServerStream and AnonymousPipeClientStream ...

Get Visual Basic 2008 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.