Search Wiki:
Resource Page Description
Given the enormous expressive power that the LINQ technology puts in the hands of developers, it is not surprising that we have started to search for ways to “LINQ-activate” more and more data types and technologies. As an example of simple “LINQ activation” of classes, here we present the implementation of an extension that will allow us to use integrated query syntax over data received through a named pipe. Pipes are a well-known inter-process communication mechanism that has long been in the DOS/Windows world; but only with .NET Framework 3.5 we will be able to use them in our managed code applications without having to recur to platform invocation.


Pipes can be:

1. Anonymous pipes are used to facilitate communication between a parent process and a child process residing on the same machine
2. Named pipes offer much more power and can be used over a network. Specifically, named pipes offer message-oriented communications.

One of the attached programs implements a server which send UTF8-encoded string messages to its listener through a pipe named CS3. The client, on the other end, composes received messages. What if the client process needed to filter, sort, group, etc. the received strings? Traditional coding approaches to implement these tasks could be applied, of course, but a more far-sighted approach would be to define a “LINQ entry point” in the form of an extension method for the NamedPipeClientStream class, so that it can be used as the source for language integrated queries.
Last edited Jan 26 2008 at 2:48 AM  by CharlieCalvert, version 2
Updating...
Page view tracker