Pipes (RPC)
The pipe type constructor is a highly efficient mechanism for passing large amounts of data, or any quantity of data that is not all available in memory at one time. By using a pipe, RPC run time handles the actual data transfer, eliminating the overhead associated with repeated remote procedure calls.
After a client invokes a remote procedure that has a pipe parameter, the client and server enter loops to transfer data. The data can be produced on the client or the server. Either way, the amount of data (in bytes) does not have to be known in advance. The data can be produced or consumed incrementally. While in the data-transfer loop, the server calls stub routines that load or unload a buffer of data. The client calls programmer-defined procedures to allocate buffers, load data into and unload data from the buffers.
This section provides an overview of using pipes for remote procedure calls. It presents the overview in the following topics:
- Essential Pipe Terminology
- The Pipe State
- Defining Pipes in IDL Files
- Client-Side Pipe Implementation
- Server-Side Pipe Implementation
- Rules for Multiple Pipes
- Combining Pipe and Nonpipe Parameters
For more information on pipe syntax and restrictions, see pipe in the MIDL Language Reference. The PIPES sample program in the Platform Software Development Kit (SDK) samples\rpc directory demonstrates how to use [in,out] pipes to transfer data between a client and a server.