Chapter 4 -- Named Pipes

Chapter 4

Named pipes are a simple interprocess communication (IPC) mechanism included in Microsoft Windows NT, Windows 2000, Windows 95, and Windows 98 (but not Windows CE). Named pipes provide reliable one-way and two-way data communications among processes on the same computer or among processes on different computers across a network. Developing applications using named pipes is actually quite simple and requires no formal knowledge of underlying network transport protocols (such as TCP/IP or IPX). This is because named pipes use the Microsoft Network Provider (MSNP) redirector to form communication among processes over a network, thus hiding network protocol details from the application. One of the best reasons for using named pipes as a networking communication solution is that they take advantage of security features built into Windows NT and Windows 2000.

One possible scenario for using named pipes is developing a data management system that allows only a select group of people to perform transactions. Imagine an office setting in which you have a computer that contains company secrets. You need to have these secrets accessed and maintained by management personnel only. Let's say every employee can see the computer on the network from his or her workstation. However, you do not want regular employees to obtain access to the confidential records. Named pipes work well in this situation because you can develop a server application that, based on requests from clients, safely performs transactions on the company secrets. The server can easily limit client access to management personnel by using security features of Windows NT or Windows 2000.

What's important to remember when using named pipes as a network programming solution is that they feature a simple client/server data-communication architecture that reliably transmits data. This chapter explains how to develop named pipe client and server applications. We will start by explaining named pipe naming conventions, followed by basic pipe types. We'll then show how to implement a basic server application followed by advanced server programming details. Next we'll discuss how to develop a basic client application. By the chapter's end, we'll uncover the known problems and limitations of named pipes.



Network Programming for Microsoft Windows
Linux Server Hacks, Volume Two: Tips & Tools for Connecting, Monitoring, and Troubleshooting
ISBN: 735615799
EAN: 2147483647
Year: 1998
Pages: 159

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net