Question Named Pipe Server, Has Any One Done This

StoneCodeMonkey

Well-known member
Joined
Apr 17, 2009
Messages
56
Programming Experience
5-10
'Hello World'.

Sorry, couldn't resist. :highly_amused:

I came across System.IO.Pipes by accident which led to downloading an example from Microsoft's All-In-One Framework on CodePlex. The VBNamedPipeServer and Client example.

Neat I thought. Just wondering, has anyone used NamedPipeServerStream before to create a server application? One that can accept connections from many other clients.

I have created several server / client applications using TCPClient and TCPListener just so I can pass information between applications. I had never heard of, let alone considered Pipes.

Before I delve into Named Pipes, does anyone have any words of wisdom or examples they would like to share?

Regards,
 
Pipes is one of many ways of Interprocess Communications (IPC) and has existed since beginning of time, but only since .Net 3.5 there was a managed interface. This article is for Sql Server, but should be relevant also outside that scope: Named Pipes vs. TCP/IP Sockets

Named pipes in .Net has a limit of 254 clients connecting to same named pipe server. Also the nature of the communication matters, sockets for example has features like broadcast and multicast by UDP.

For local machine IPC I think I would prefer a pipe, but that changes somewhat for local network, and changes a lot for wide network (internet).

There are some examples in documentation, but really it is not complicated; connect, transfer by stream, disconnect. Stream transfer is just like for sockets/network streams and most other stream objects for that matter. Named pipes has also a little helper in that stream can be segmented as "messages" (message transmission mode) if you need that.
 
Back
Top